Professional Documents
Culture Documents
1. Objective(s):
The activity aims to demonstrate the procedures on how to simulate the
signal sensitivity statement in Model Sim.
2. Intended Learning Outcomes (ILOs):
The students shall be able to:
2.1 Test the step-by-step procedure in running the use of signal
statement VHDL codes to Model Sim.
m
3. Discussion:
er as
ModelSim PE Student Edition is a free download of the industry-leading
co
eH w
ModelSim HDL simulator for use by students in their academic coursework
(www.mentor.com).
o.
rs e
ou urc
o
aC s
vi y re
ed d
ar stu
is
Th
This application can be downloaded through the website but the license
must request individually by sending it to your email.
Signal Statement reversely said as input variable but, in this case, signals
serve the process of the architecture and were written between the
architecture and begin. The sensitivity list is inputs needed inside the
process of the architecture.
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:23:32 GMT -05:00
https://www.coursehero.com/file/90446343/e-x-e-r-c-i-s-edocx/
4. Resources:
Computer System with internet access
Model Sim Installer capacity is 345MB while it needs 400MB space
memory to your OS drive
5. Procedure:
1. Install notepad++, must add the VHDL .dll plugins
2. Open the notepad++, create a new file
Copy the following codes:
entity T06_SignalTb is
end entity;
m
er as
begin
co
process is
eH w
variable MyVariable: integer :=0; --a signal can only be
o.
declared a certain place within
rs e
--the VHD file and this is between the architecture is tag and the begin.
ou urc
begin
report "***Process begin***";
MyVariable := MyVariable + 1;
o
MyVariable := MyVariable + 1;
MySignal <= MySignal + 1;
is
end process;
end architecture;
3. Change the file name by adding 6 to T06_SignalTb6 then save as
T06_SignalTb6.vhd
4. Open Model Sim
5. Open the created T06_SignalTb6.vhd existing file to the Model Sim
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:23:32 GMT -05:00
https://www.coursehero.com/file/90446343/e-x-e-r-c-i-s-edocx/
project.
6. Compile T06_SignalTb6 until the green check appears which means no
error.
8. Once there is no error after compiling the vhd file click simulate.
9. Collapse the work library and choose the T06_SignalTb6 file you just
simulated then click ok.
10. Since there are no declared signal go on and hit the run icon beside the
100 ns, you can see Fig. 5.1.
m
er as
co
eH w
o.
rs e
ou urc
o
aC s
vi y re
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:23:32 GMT -05:00
https://www.coursehero.com/file/90446343/e-x-e-r-c-i-s-edocx/
Figure 5.2 Transcript Window
Learnings:
Notice that the program process iterates every 10 nanoseconds as
“wait for 10 ns” was written in VHDL codes. Also signal needs to drag
from the object area to the wave first column after clicking the simulate
button. Thus, the signal increments every 10 ns while printing the signal
value and “***Process begin***” while the variable is continuously
updated every report statement.
entity T09_SensitivityListTb is
end entity;
m
er as
signal CountUp : integer :=0; --counter
co
signal CountDown : integer :=10; --counter
eH w
begin
process is
o.
begin rs e
ou urc
CountUp <= CountUp + 1; --increment the countup signal
CountDown <= CountDown - 1; --decrement the countdown signal
o
wait for 10 ns; --remember no process can be left without the wait
aC s
statement
vi y re
end process;
begin
ar stu
end if;
Th
end process;
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:23:32 GMT -05:00
https://www.coursehero.com/file/90446343/e-x-e-r-c-i-s-edocx/
if CountUp = CountDown then
report "Process B Jackpot!";
end if;
end process;
end architecture;
m
er as
co
eH w
o.
rs e
ou urc
o
aC s
The code inside the process will be executed once, then the program
will wait at the beginning of the process until either of the two signals
change if the signals are equal the printout will appear but the process will
sh
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:23:32 GMT -05:00
https://www.coursehero.com/file/90446343/e-x-e-r-c-i-s-edocx/
library ieee;
use ieee.std_logic_1164.all;
entity T10_StdLogicTb is
end entity;
begin
wait for 10 ns; --remember no process can be left without the wake
m
er as
statement
co
Signal1 <= not Signal1;
eH w
end process;
o.
rs e
ou urc
end architecture;
13. The Output has U and there is no message in the transcript area.
o
aC s
vi y re
ed d
ar stu
is
Th
sh
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:23:32 GMT -05:00
https://www.coursehero.com/file/90446343/e-x-e-r-c-i-s-edocx/
Figure 5.6 Transcript of Std_logic codes
Learnings:
Notice that when you use std_logic the initial 0 value of the variable
Signal1 was enclosed with a single(‘’) quote. Table 1 represents the signal
wire status in the logic circuits. Also, when std_logic was used you need to
include the library IEEE; and use IEEE.std_logic_1164.all;
m
er as
co
eH w
o.
Table 1. Meaning of each Std_Logic Signal
rs e
ou urc
14. Added codes for Std_logic codes after the end process;
Process is
begin
o
Wait;
End process;
ed d
ar stu
is
Th
sh
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:23:32 GMT -05:00
https://www.coursehero.com/file/90446343/e-x-e-r-c-i-s-edocx/
m
er as
co
eH w
Figure 5.7 Output With High Impedance
o.
rs e
ou urc
o
aC s
vi y re
6. Activity
ed d
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:23:32 GMT -05:00
https://www.coursehero.com/file/90446343/e-x-e-r-c-i-s-edocx/
Add another process that when the variable reaches to “1” it will
print “the device is on” from Activity 6.1 and run it, explain the
added process.
______________________________________________________________________
_____
______________________________________________________________________
_____
Add a loop statement that prints each bit from Activity 6.2 and run it,
explain the added process.
___________________________________________________________________________
VHDL codes (paste here the screenshot of the VHDL codes from answered
questions for Activity 6.1 and Activity 6.2)
m
er as
co
eH w
Output (paste here the screenshot of the output waveform of the edited
Activity 6.1 and Activity 6.2 coming from the questions)
o.
rs e
ou urc
o
Conclusion:
aC s
vi y re
ed d
ar stu
Assessment:
is
Th
sh
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:23:32 GMT -05:00
https://www.coursehero.com/file/90446343/e-x-e-r-c-i-s-edocx/
Powered by TCPDF (www.tcpdf.org)