Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to print enumerated signal to file in VHDL testbench?

Status
Not open for further replies.

design_engineer

Newbie level 6
Joined
Oct 23, 2006
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,411
Hello,

I have a signal defined as an enumerated type in my design.

type state is (idle, start, run, end);
signal t_state is array (3 downto 0) of state;

How do I print the value of this signal to a file during my simulation?

When I do

write(line_out, t_state) or write(line_out, t_state(0))

I get argument type mismatch error during compilation.

Please help.
 

Re: How to print enumerated signal to file in VHDL testbench

you can assign values to everything :

for example :

dbg_p : process (clk)
begin
if rising_edge(clk) then
new_arb_sm_dff <= new_arb_sm;
case new_arb_sm_dff is
when IDLE => pkt_arb_state_dbg <= "000";
when NPI_REQ => pkt_arb_state_dbg <= "001";
when GNT_ASI_0 => pkt_arb_state_dbg <= "010";
when GNT_ASI_1 => pkt_arb_state_dbg <= "011";
when GNT_IP => pkt_arb_state_dbg <= "100";
end case;
end if;
end process dbg_p;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top