electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

How to print enumerated signal to file in VHDL testbench?


Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design -> How to print enumerated signal to file in VHDL testbench?
Author Message
design_engineer



Joined: 23 Oct 2006
Posts: 11


Post07 Mar 2008 21:17   

How to print enumerated signal to file in VHDL testbench?


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.
Back to top
Google
AdSense
Google Adsense




Post07 Mar 2008 21:17   

Ads




Back to top
shawndaking



Joined: 20 Jun 2001
Posts: 235
Helped: 6


Post09 Mar 2008 13:06   

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;
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design -> How to print enumerated signal to file in VHDL testbench?
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
VHDL testbench SDF file annotation problem (3)
How to print .dat file (2)
How to print my schematic to a .ps file? (3)
how to write a testbench file with tcl? (4)
How to use Environment Variable in VHDL testbench (8)
How to print simulation data to .txt file in Spectre? (1)
How to print sch. to pdf file from Cadence IC5141 (1)
How to generate the testbench for signal process algorithim? (6)
How To Convert VERILOG FILE TO VHDL FILE (2)
vhdl testbench (7)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS