This Study Resource Was: Modelsim Pe Student Edition Is A Free Download of The Industry-Leading
This Study Resource Was: Modelsim Pe Student Edition Is A Free Download of The Industry-Leading
m
er as
ModelSim PE Student Edition is a free download of the industry-leading
ModelSim HDL simulator for use by students in their academic coursework
co
eH w
(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
sh
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:16:50 GMT -05:00
https://www.coursehero.com/file/92654782/Exercise-No-7docx/
Review of signed and unsigned:
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity signedunsigned12 is
end entity;
m
er as
signal uns8 : unsigned(7 downto 0) := (others =>'0');
co
signal sig8 : signed(7 downto 0) := (others =>'0');
eH w
begin
o.
process is
begin rs e
ou urc
wait for 10 ns;
--wrapping counter
unscnt <= unscnt +1;
o
--adding signals
vi y re
end architecture;
ar stu
is
Th
sh
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:16:50 GMT -05:00
https://www.coursehero.com/file/92654782/Exercise-No-7docx/
4. Resources:
Computer System with internet access
m
Model Sim Installer capacity is 345MB while it needs 400MB space
er as
memory to your OS drive
co
eH w
5. Procedure:
o.
1. Install notepad++, must add the VHDL .dll plugins
rs e
2. Open the notepad++, create new file
ou urc
Copy the following codes:
library ieee;
use ieee.std_logic_1164.all;
o
use ieee.numeric_std.all;
aC s
vi y re
entity T13_ConcurrentProcsTb is
end entity;
begin
Uns <= Uns + 1; --increment by 1 every 10 ns
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:16:50 GMT -05:00
https://www.coursehero.com/file/92654782/Exercise-No-7docx/
end process;
--Process multiplying Uns by 4
process is
begin
Mul1 <= Uns & "00"; --the Uns 6 bits was added two zeros to
have 8 bits
wait on Uns; --the program will wait here until the 6-bit signal
changes
--when this happens it will wake up
end process;
--Equivalent process using sensitivity list
process(Uns) is
m
er as
begin
co
eH w
Mul2 <= Uns & "00"; --the Uns 6 bits was added two zeros
to have 8 bits
o.
end process; rs e
ou urc
--Equivalent process using a concurrent statement and is the same as
the other process with wait statement
Mul3 <= Uns & "00";
o
aC s
end architecture;
vi y re
10. Drag the signal to the wave first column and hit run icon beside the
100 ns, you can see Fig. 5.2.
sh
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:16:50 GMT -05:00
https://www.coursehero.com/file/92654782/Exercise-No-7docx/
m
er as
co
eH w
Figure 5.1 Toggled Leaf Names of the Signal
o.
You can toggle the signal names located at the lower part of the signal
name. rs e
ou urc
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:16:50 GMT -05:00
https://www.coursehero.com/file/92654782/Exercise-No-7docx/
m
er as
co
eH w
Figure 5.3 without radix output
o.
rs e
Figure 5.4 can be seen by typing “radix noshowbase” at the transcript
ou urc
window(from fig.5.3 it is beside the VSIM 25>).
Learnings:
In multiplying the unsigned numbers by 4 you can use “& ”00”.
o
Something like when you add 1 plus 00 becomes “100” which is 4. This is
aC s
way of writing a process but the output is still the same. However, there
Th
sensitivity list.
11. For Exercise No. 8-1, what if the bits will shift to the right? What will you
do?
Clue: you may or not change the following:
7 downto 0
Uns <= Uns + 1;
This study source was downloaded by 100000817485283 from CourseHero.com on 09-09-2021 02:16:50 GMT -05:00
https://www.coursehero.com/file/92654782/Exercise-No-7docx/
12. subtype NATURAL is integer range 0 to integer'high;
6. Activity
6.1 Create Exercise No. 8-1 by referring to step number 11 above.
After running it without errors, paste the screenshot of the codes
and the Modelsim Waveform in the next row below. Differentiate
the codes from the first waveform output and the last waveform
output. What makes it different?
m
er as
co
eH w
o.
rs e
ou urc
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:16:50 GMT -05:00
https://www.coursehero.com/file/92654782/Exercise-No-7docx/
m
er as
co
eH w
o.
rs e
ou urc
There were changes on the output waveform as the bits shift from
left going to the right.
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:16:50 GMT -05:00
https://www.coursehero.com/file/92654782/Exercise-No-7docx/
Powered by TCPDF (www.tcpdf.org)