Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Program Utama
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity SR_latch is
Port(
r,s : in std_logic;
q,qbar : inout std_logic
);
end SR_latch;
end dataflow;
TestBench
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity SR_latch_tb is
end SR_latch_tb;
end dataflow;
[2019-05-22 13:13:59 EDT] vlib work && vcom '-2008' '-o' design.vhd testbench.vhd &&
vsim -c -do "vsim testbench tugas3; vcd file dump.vcd; vcd add -r sim:/testbench/*vcd
add -r sim:/tugas3/*; run -all; exit"
VSIMSA: Configuration file changed: `/home/runner/library.cfg'
ALIB: Library `work' attached.
work = /home/runner/work/work.lib
Aldec, Inc. VHDL Compiler, build 2014.06.88
VLM Initialized with path: "/home/runner/library.cfg".
DAGGEN WARNING DAGGEN_0523: "The source is compiled without the -dbg switch. Line
breakpoints and assertion debug will not be available."
COMP96 File: design.vhd
COMP96 Compile Entity "SR_latch"
COMP96 Compile Architecture "dataflow" of Entity "SR_latch"
COMP96 File: testbench.vhd
COMP96 Compile Entity "SR_latch_tb"
COMP96 Compile Architecture "dataflow" of Entity "SR_latch_tb"
COMP96 Top-level unit(s) detected:
COMP96 Entity => SR_latch_tb
COMP96 Compile success 0 Errors 0 Warnings Analysis time : 40.0 [ms]
# Aldec, Inc. Riviera-PRO version 2014.06.88.5387 built for Linux64 on June 25, 2014.
# HDL, SystemC, and Assertions simulator, debugger, and design environment.
# (c) 1999-2014 Aldec, Inc. All rights reserved.
vsim testbench tugas3;
# VSIM: Error: Unknown library unit 'testbench' specified.
# VSIM: Error: Unknown library unit 'tugas3' specified.
# VSIM: Error: Simulation initialization failed.
Finding VCD file...
No *.vcd file found. EPWave will not open. Did you use '$dumpfile("dump.vcd");
$dumpvars;'?
Done
5.2.1 D flip-flop behavioral
Program Utama
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity D_Flip_Flop is
Port(
D,clk : in std_logic;
Q : out std_logic
);
end D_Flip_Flop;
TestBench
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity D_Flip_Flop_tb is
end D_Flip_Flop_tb;
[2019-05-22 13:16:13 EDT] vlib work && vcom '-2008' '-o' design.vhd testbench.vhd &&
vsim -c -do "vsim testbench lab5; vcd file dump.vcd; vcd add -r sim:/testbench/*vcd
add -r sim:/lab5/*; run -all; exit"
VSIMSA: Configuration file changed: `/home/runner/library.cfg'
ALIB: Library `work' attached.
work = /home/runner/work/work.lib
Aldec, Inc. VHDL Compiler, build 2014.06.88
VLM Initialized with path: "/home/runner/library.cfg".
DAGGEN WARNING DAGGEN_0523: "The source is compiled without the -dbg switch. Line
breakpoints and assertion debug will not be available."
COMP96 File: design.vhd
COMP96 Compile Entity "D_Flip_Flop"
COMP96 Compile Architecture "Behavioral" of Entity "D_Flip_Flop"
COMP96 File: testbench.vhd
COMP96 Compile Entity "D_Flip_Flop_tb"
COMP96 Compile Architecture "Behavioral" of Entity "D_Flip_Flop_tb"
COMP96 Top-level unit(s) detected:
COMP96 Entity => D_Flip_Flop_tb
COMP96 Compile success 0 Errors 0 Warnings Analysis time : 40.0 [ms]
# Aldec, Inc. Riviera-PRO version 2014.06.88.5387 built for Linux64 on June 25, 2014.
# HDL, SystemC, and Assertions simulator, debugger, and design environment.
# (c) 1999-2014 Aldec, Inc. All rights reserved.
vsim testbench lab5;
# VSIM: Error: Unknown library unit 'testbench' specified.
# VSIM: Error: Unknown library unit 'lab5' specified.
# VSIM: Error: Simulation initialization failed.
Finding VCD file...
No *.vcd file found. EPWave will not open. Did you use '$dumpfile("dump.vcd");
$dumpvars;'?
Done