Altera_Forum
Honored Contributor
14 years agoProblem in ahdl-source
Hello all!
I want create component which holds vcc-state after than high state is on each input. Clr resets state. I supposed that is a very simple. My idea is using dffe primitive with: clk = Inp, d = vcc, clrn = not(Rst). My code for 32 inputs is below: CODE BEGIN -- Prototype function dffe --FUNCTION DFFE (D, CLK, CLRN, PRN, ENA) --RETURNS (Q); PARAMETERS ( Width = 32 ); SUBDESIGN holdmax ( clk : INPUT; -- clock Ena : INPUT; -- enable Rst : INPUT; -- reset by "1" I[Width-1..0]: INPUT; -- input data bus O[Width-1..0]: OUTPUT; -- quit ) VARIABLE tapes[Width-1..0] : NODE; BEGIN FOR k IN 0 TO (Width-1) GENERATE tapes[k] = dffe(vcc, I[k], not(Rst), vcc, Ena); END GENERATE; O[] = tapes[]; END; CODE END But I have problems with my code:( This code is compiled in Quartus 9.1 correctly. Another situation is in Max2Plus! I have warning "Ignored unnecessary INPUT pin 'Clk'" and signal Clk is not used!(?) I need code which can be compiled correctly in either program. Where is my problem? Is it my bad code? Thanks all!