Skip to content

Commit 4bf7169

Browse files
committed
CU DP Design
1 parent bd79276 commit 4bf7169

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

lab_08/lab_8_2.vhd.bak

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
LIBRARY IEEE;
2+
USE IEEE.STD_LOGIC_1164.ALL;
3+
USE IEEE.STD_LOGIC_ARITH.ALL;
4+
use IEEE.STD_LOGIC_UNSIGNED.ALL;
5+
6+
Entity lab_8_2 is
7+
8+
port(
9+
clk : IN STD_LOGIC ;
10+
load : IN STD_LOGIC ;
11+
clear : IN STD_LOGIC ;
12+
out_sel : IN std_logic ;
13+
14+
iNOT10 : out std_logic; --status signal
15+
dp_out : out std_logic_vector(3 downto 0)--display out
16+
17+
);
18+
19+
END lab_8_2;
20+
21+
Architecture dataflow of lab_8_2 is
22+
signal iNOT10S: std_logic :='1';
23+
signal data : std_logic_vector(3 downto 0) := "0000";
24+
TYPE state_type IS(S0,S1,S2,S3);
25+
SIGNAL state:state_type;
26+
27+
begin
28+
29+
process(clear, clk) is
30+
begin
31+
32+
if (clear = '1') then
33+
data <= "0000";
34+
state<=S0;
35+
36+
elsif (clk'EVENT AND clk = '1') then
37+
if (load = '1' and iNOT10S/='0') then
38+
data <= data + '1';
39+
if(out_sel='1') then
40+
dp_out<=data;
41+
else
42+
dp_out <= "ZZZZ";
43+
end if;
44+
if data="1010" then
45+
iNOT10S<='0';
46+
end if;
47+
48+
elsif (out_sel='0') then
49+
dp_out<="ZZZZ";
50+
end if;
51+
end if;
52+
end process;
53+
54+
iNOT10<=iNOT10S;
55+
56+
end dataflow;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Info: Start Nativelink Simulation process
2+
3+
========= EDA Simulation Settings =====================
4+
5+
Sim Mode : Gate
6+
Family : cycloneivgx
7+
Quartus root : c:/altera/13.1/quartus/bin64/
8+
Quartus sim root : c:/altera/13.1/quartus/eda/sim_lib
9+
Simulation Tool : modelsim-altera
10+
Simulation Language : vhdl
11+
Version : 93
12+
Simulation Mode : GUI
13+
Sim Output File : lab_8_2_6_1200mv_85c_slow.vho
14+
Sim SDF File : lab_8_2_6_1200mv_85c_vhd_slow.sdo
15+
Sim dir : simulation\modelsim
16+
17+
=======================================================
18+
19+
Info: Starting NativeLink simulation with ModelSim-Altera software
20+
Sourced NativeLink script c:/altera/13.1/quartus/common/tcl/internal/nativelink/modelsim.tcl
21+
Warning: File lab_8_2_run_msim_gate_vhdl.do already exists - backing up current file as lab_8_2_run_msim_gate_vhdl.do.bak1
22+
Info: Spawning ModelSim-Altera Simulation software

0 commit comments

Comments
 (0)