![]() |
|
|
|
#1 |
|
Hi, All,
I encounter an error when comply with MAX+PLUS II -- part of the code as follow: -- architecture bhv of calculator is signal a,b,c,d,oper1,oper2 : std_logic_vector(3 downto 0); signal x,y,tmp : std_logic_vector(7 downto 0); signal EQ : std_logic_vector(1 downto 0); --- another Process --- Calculate variable tmp,tmp_x,tmp_y,tmp_ans : std_logic_vector(7 downto 0); begin tmp_x<=x; tmp_y<=y; if EQ="01" then if oper1="1010" then --- + tmp:=tmp_x+tmp_y; elsif oper1="1011" then --- - tmp:=tmp_x-tmp_y; elsif oper1="1100" then --- x tmp:=tmp_x*tmp_y; elsif oper1="1110" then --- / for i in 0 to 10 loop if tmp_x>=tmp_y then tmp_ans:=tmp_ans+"00000001"; tmp_x:=tmp_x-tmp_y; tmp:=tmp_ans; end if; end loop; end if; elsif EQ=10" then if oper1="1010" then tmp:=tmp_x+tmp_y; elsif oper2="1010" then tmp:=tmp_x+tmp_y; elsif oper2="1011" then tmp:=tmp_x-tmp_y; end if; elsif EQ="11" then if oper2="1010" then tmp:=tmp_x+tmp_y; elsif oper2="1011" then if tmp_x>=tmp_y then tmp:=tmp_x-tmp_y; else null; end if; end if; else tmp:=(others=>'0'); tmp_x:=(others=>'0'); tmp_y:=(others=>'0'); tmp_ans:=(others=>'0'); end if; Ans<=tmp; end process; I don't find any multiple source for it. I can't understand. Can anyone help me explain it? please help me. This's my last chance. Regards ViaTy ViaTy |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 70-542 sources | JeLo | MCTS | 0 | 08-10-2007 02:28 AM |
| HEXUS.opinions :: Intel in grave trouble, say unreliable sources | Silverstrand | Front Page News | 0 | 10-22-2006 08:52 PM |
| disagreeing sources | Bobbo | A+ Certification | 6 | 10-24-2005 02:02 PM |
| The Non-Arguable Case Against the Bush Administration 1 | Sara | DVD Video | 65 | 11-07-2004 02:42 AM |
| A Few Good Supplemental Sources for A+ Info | P. Qwan | A+ Certification | 1 | 07-12-2004 08:07 PM |