Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Entity declaration

Status
Not open for further replies.

marcif

Programmer
Joined
Dec 3, 2001
Messages
1
Location
DE
hello
please if i have the following entity declaration fo an 8 bits ACC suporting ALU operation :

entity ACC is
--generic contsnst
generic (Delay: Time := 10 ns)
--port declaration
port ( CLK, RESET: in bit ;
-- bla bla bla
CFLG, ZFLG, NFLG, OFLOW : in Bit
CFLG, ZFLG, NFLG, OFLOW : out Bit; -- zero,carry,negative and overflow falgs
); --??? how do i reserve the other 4 bits for later use?
end ACC;


note: i want to have an 8 bits ACC and an 8 bits flag register

Thanks
 
I too am new to VHDL, but probably the following way would help u out...

entity ACC is
generic (Delay: Time := 10 ns)
port ( CLK, RESET: in bit ;
-- bla bla bla
CFLG, ZFLG, NFLG, OFLOW : in Bit --instead of this use
flags_in: in Bit_vector( 7 downto 0); -- and
flags_out: out Bit_vector( 7 downto 0); --and assign 4 of these 8 bits to ur flags... thus u will be saving the rest 4 for future use...

end ACC;

hope i have understood ur problem right...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top