This simulation exposes the student some modeling topics not covered in the VHDL synthesis course; namely File IO, timing modeling, and VHDL configurations.
Write the architecture for the VHDL entity shown below:
entity timecheck is generic ( thd: time := 0 ps; -- hold time tsu: time := 0 ps; -- setup time tpwh: time := 0 ps; -- pulse width high min tpwl: time := 0 ps; -- pulse width low minimum spikefilt: time:= 0 ps; -- spike rejection wd_d: time := 0 ps; -- wire delay, d input wd_clk: time := 0 ps -- wire delay, clk input ); port ( clk : in std_logic; -- input port d : in std_logic -- input port ); end timecheck;
The architecture for the 'timecheck' entity is to do the following:
The timing violations should be written in the following format:
'violation message' : 'timeval_found' < 'timeval_required'Examples are:
setup time violation: 0.01 ns < 0.05 ns clock min pulse width high violation: 0.01 ns < 0.3 ns clock min pulse width low violation: 0.01 ns < 0.5 ns setup time violation: 0.045 ns < 0.05 ns hold time violation: 0.07 ns < 0.075 ns
These messages should be generated via a 'report' statement inside of an 'assertion' statement of severity 'warning'. It is VERY IMPORTANT that this wording be used. The 'qvsim' wraps some additional text around the output of the report statement so the complete output will look like:
# Time: 1050 ps Iteration: 0 Instance:/tc # ** Warning: setup time violation: 0.045 ns < 0.05 nsSignal initialization (events at time 0) usually cause false timing violations to be reported; this is ok.
entity stimfile is generic ( fname : string := "in.dat" ); port ( o : out std_logic ); end stimfile;
The architecture is read lines from a file which each line looks like:
std_logic_value timeExamples are:
0 0 ps 1 100 ps Z 200 ps X 400 psThe timevalue is the time at which that value should be applied to the 'o' output port. The architecture should continue to read lines out of the file named via the 'fname' generic until there are no more lines in the file.
I have listed some other constraints that you need to follow in order to make your architecture compatible with my testbench: