diff --git a/Quartus/v4/Waveform.vwf b/Quartus/v4/Waveform.vwf
index 2e42972..d5dbc00 100644
--- a/Quartus/v4/Waveform.vwf
+++ b/Quartus/v4/Waveform.vwf
@@ -23,6 +23,10 @@ quit -f
+
+
+
+
onerror {exit -code 1}
vlib work
@@ -44,6 +48,10 @@ quit -f
+
+
+
+
verilog
*/
@@ -412,96 +420,6 @@ SIGNAL("out1[0]")
PARENT = "out1";
}
-SIGNAL("sel")
-{
- VALUE_TYPE = NINE_LEVEL_BIT;
- SIGNAL_TYPE = BUS;
- WIDTH = 8;
- LSB_INDEX = 0;
- DIRECTION = OUTPUT;
- PARENT = "";
-}
-
-SIGNAL("sel[7]")
-{
- VALUE_TYPE = NINE_LEVEL_BIT;
- SIGNAL_TYPE = SINGLE_BIT;
- WIDTH = 1;
- LSB_INDEX = -1;
- DIRECTION = OUTPUT;
- PARENT = "sel";
-}
-
-SIGNAL("sel[6]")
-{
- VALUE_TYPE = NINE_LEVEL_BIT;
- SIGNAL_TYPE = SINGLE_BIT;
- WIDTH = 1;
- LSB_INDEX = -1;
- DIRECTION = OUTPUT;
- PARENT = "sel";
-}
-
-SIGNAL("sel[5]")
-{
- VALUE_TYPE = NINE_LEVEL_BIT;
- SIGNAL_TYPE = SINGLE_BIT;
- WIDTH = 1;
- LSB_INDEX = -1;
- DIRECTION = OUTPUT;
- PARENT = "sel";
-}
-
-SIGNAL("sel[4]")
-{
- VALUE_TYPE = NINE_LEVEL_BIT;
- SIGNAL_TYPE = SINGLE_BIT;
- WIDTH = 1;
- LSB_INDEX = -1;
- DIRECTION = OUTPUT;
- PARENT = "sel";
-}
-
-SIGNAL("sel[3]")
-{
- VALUE_TYPE = NINE_LEVEL_BIT;
- SIGNAL_TYPE = SINGLE_BIT;
- WIDTH = 1;
- LSB_INDEX = -1;
- DIRECTION = OUTPUT;
- PARENT = "sel";
-}
-
-SIGNAL("sel[2]")
-{
- VALUE_TYPE = NINE_LEVEL_BIT;
- SIGNAL_TYPE = SINGLE_BIT;
- WIDTH = 1;
- LSB_INDEX = -1;
- DIRECTION = OUTPUT;
- PARENT = "sel";
-}
-
-SIGNAL("sel[1]")
-{
- VALUE_TYPE = NINE_LEVEL_BIT;
- SIGNAL_TYPE = SINGLE_BIT;
- WIDTH = 1;
- LSB_INDEX = -1;
- DIRECTION = OUTPUT;
- PARENT = "sel";
-}
-
-SIGNAL("sel[0]")
-{
- VALUE_TYPE = NINE_LEVEL_BIT;
- SIGNAL_TYPE = SINGLE_BIT;
- WIDTH = 1;
- LSB_INDEX = -1;
- DIRECTION = OUTPUT;
- PARENT = "sel";
-}
-
SIGNAL("upd")
{
VALUE_TYPE = NINE_LEVEL_BIT;
@@ -522,6 +440,106 @@ SIGNAL("subclk")
PARENT = "";
}
+SIGNAL("clk_50m")
+{
+ VALUE_TYPE = NINE_LEVEL_BIT;
+ SIGNAL_TYPE = SINGLE_BIT;
+ WIDTH = 1;
+ LSB_INDEX = -1;
+ DIRECTION = INPUT;
+ PARENT = "";
+}
+
+SIGNAL("seg")
+{
+ VALUE_TYPE = NINE_LEVEL_BIT;
+ SIGNAL_TYPE = BUS;
+ WIDTH = 8;
+ LSB_INDEX = 0;
+ DIRECTION = OUTPUT;
+ PARENT = "";
+}
+
+SIGNAL("seg[7]")
+{
+ VALUE_TYPE = NINE_LEVEL_BIT;
+ SIGNAL_TYPE = SINGLE_BIT;
+ WIDTH = 1;
+ LSB_INDEX = -1;
+ DIRECTION = OUTPUT;
+ PARENT = "seg";
+}
+
+SIGNAL("seg[6]")
+{
+ VALUE_TYPE = NINE_LEVEL_BIT;
+ SIGNAL_TYPE = SINGLE_BIT;
+ WIDTH = 1;
+ LSB_INDEX = -1;
+ DIRECTION = OUTPUT;
+ PARENT = "seg";
+}
+
+SIGNAL("seg[5]")
+{
+ VALUE_TYPE = NINE_LEVEL_BIT;
+ SIGNAL_TYPE = SINGLE_BIT;
+ WIDTH = 1;
+ LSB_INDEX = -1;
+ DIRECTION = OUTPUT;
+ PARENT = "seg";
+}
+
+SIGNAL("seg[4]")
+{
+ VALUE_TYPE = NINE_LEVEL_BIT;
+ SIGNAL_TYPE = SINGLE_BIT;
+ WIDTH = 1;
+ LSB_INDEX = -1;
+ DIRECTION = OUTPUT;
+ PARENT = "seg";
+}
+
+SIGNAL("seg[3]")
+{
+ VALUE_TYPE = NINE_LEVEL_BIT;
+ SIGNAL_TYPE = SINGLE_BIT;
+ WIDTH = 1;
+ LSB_INDEX = -1;
+ DIRECTION = OUTPUT;
+ PARENT = "seg";
+}
+
+SIGNAL("seg[2]")
+{
+ VALUE_TYPE = NINE_LEVEL_BIT;
+ SIGNAL_TYPE = SINGLE_BIT;
+ WIDTH = 1;
+ LSB_INDEX = -1;
+ DIRECTION = OUTPUT;
+ PARENT = "seg";
+}
+
+SIGNAL("seg[1]")
+{
+ VALUE_TYPE = NINE_LEVEL_BIT;
+ SIGNAL_TYPE = SINGLE_BIT;
+ WIDTH = 1;
+ LSB_INDEX = -1;
+ DIRECTION = OUTPUT;
+ PARENT = "seg";
+}
+
+SIGNAL("seg[0]")
+{
+ VALUE_TYPE = NINE_LEVEL_BIT;
+ SIGNAL_TYPE = SINGLE_BIT;
+ WIDTH = 1;
+ LSB_INDEX = -1;
+ DIRECTION = OUTPUT;
+ PARENT = "seg";
+}
+
TRANSITION_LIST("CO")
{
NODE
@@ -538,9 +556,9 @@ TRANSITION_LIST("clk")
REPEAT = 1;
NODE
{
- REPEAT = 200;
- LEVEL 0 FOR 2.5;
- LEVEL 1 FOR 2.5;
+ REPEAT = 50;
+ LEVEL 0 FOR 10.0;
+ LEVEL 1 FOR 10.0;
}
}
}
@@ -550,7 +568,9 @@ TRANSITION_LIST("clr")
NODE
{
REPEAT = 1;
- LEVEL 1 FOR 1000.0;
+ LEVEL 1 FOR 580.0;
+ LEVEL 0 FOR 40.0;
+ LEVEL 1 FOR 380.0;
}
}
@@ -641,7 +661,7 @@ TRANSITION_LIST("in0[2]")
NODE
{
REPEAT = 1;
- LEVEL 0 FOR 1000.0;
+ LEVEL 1 FOR 1000.0;
}
}
@@ -659,7 +679,7 @@ TRANSITION_LIST("in0[0]")
NODE
{
REPEAT = 1;
- LEVEL 0 FOR 1000.0;
+ LEVEL 1 FOR 1000.0;
}
}
@@ -677,7 +697,7 @@ TRANSITION_LIST("in1[2]")
NODE
{
REPEAT = 1;
- LEVEL 0 FOR 1000.0;
+ LEVEL 1 FOR 1000.0;
}
}
@@ -686,7 +706,7 @@ TRANSITION_LIST("in1[1]")
NODE
{
REPEAT = 1;
- LEVEL 0 FOR 1000.0;
+ LEVEL 1 FOR 1000.0;
}
}
@@ -704,7 +724,9 @@ TRANSITION_LIST("load")
NODE
{
REPEAT = 1;
- LEVEL 0 FOR 1000.0;
+ LEVEL 0 FOR 480.0;
+ LEVEL 1 FOR 30.0;
+ LEVEL 0 FOR 490.0;
}
}
@@ -780,78 +802,6 @@ TRANSITION_LIST("out1[0]")
}
}
-TRANSITION_LIST("sel[7]")
-{
- NODE
- {
- REPEAT = 1;
- LEVEL X FOR 1000.0;
- }
-}
-
-TRANSITION_LIST("sel[6]")
-{
- NODE
- {
- REPEAT = 1;
- LEVEL X FOR 1000.0;
- }
-}
-
-TRANSITION_LIST("sel[5]")
-{
- NODE
- {
- REPEAT = 1;
- LEVEL X FOR 1000.0;
- }
-}
-
-TRANSITION_LIST("sel[4]")
-{
- NODE
- {
- REPEAT = 1;
- LEVEL X FOR 1000.0;
- }
-}
-
-TRANSITION_LIST("sel[3]")
-{
- NODE
- {
- REPEAT = 1;
- LEVEL X FOR 1000.0;
- }
-}
-
-TRANSITION_LIST("sel[2]")
-{
- NODE
- {
- REPEAT = 1;
- LEVEL X FOR 1000.0;
- }
-}
-
-TRANSITION_LIST("sel[1]")
-{
- NODE
- {
- REPEAT = 1;
- LEVEL X FOR 1000.0;
- }
-}
-
-TRANSITION_LIST("sel[0]")
-{
- NODE
- {
- REPEAT = 1;
- LEVEL X FOR 1000.0;
- }
-}
-
TRANSITION_LIST("upd")
{
NODE
@@ -871,9 +821,95 @@ TRANSITION_LIST("subclk")
}
}
+TRANSITION_LIST("clk_50m")
+{
+ NODE
+ {
+ REPEAT = 1;
+ NODE
+ {
+ REPEAT = 200;
+ LEVEL 0 FOR 2.5;
+ LEVEL 1 FOR 2.5;
+ }
+ }
+}
+
+TRANSITION_LIST("seg[7]")
+{
+ NODE
+ {
+ REPEAT = 1;
+ LEVEL X FOR 1000.0;
+ }
+}
+
+TRANSITION_LIST("seg[6]")
+{
+ NODE
+ {
+ REPEAT = 1;
+ LEVEL X FOR 1000.0;
+ }
+}
+
+TRANSITION_LIST("seg[5]")
+{
+ NODE
+ {
+ REPEAT = 1;
+ LEVEL X FOR 1000.0;
+ }
+}
+
+TRANSITION_LIST("seg[4]")
+{
+ NODE
+ {
+ REPEAT = 1;
+ LEVEL X FOR 1000.0;
+ }
+}
+
+TRANSITION_LIST("seg[3]")
+{
+ NODE
+ {
+ REPEAT = 1;
+ LEVEL X FOR 1000.0;
+ }
+}
+
+TRANSITION_LIST("seg[2]")
+{
+ NODE
+ {
+ REPEAT = 1;
+ LEVEL X FOR 1000.0;
+ }
+}
+
+TRANSITION_LIST("seg[1]")
+{
+ NODE
+ {
+ REPEAT = 1;
+ LEVEL X FOR 1000.0;
+ }
+}
+
+TRANSITION_LIST("seg[0]")
+{
+ NODE
+ {
+ REPEAT = 1;
+ LEVEL X FOR 1000.0;
+ }
+}
+
DISPLAY_LINE
{
- CHANNEL = "clr";
+ CHANNEL = "clk";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
TREE_INDEX = 0;
@@ -882,7 +918,7 @@ DISPLAY_LINE
DISPLAY_LINE
{
- CHANNEL = "clk";
+ CHANNEL = "clk_50m";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
TREE_INDEX = 1;
@@ -898,122 +934,113 @@ DISPLAY_LINE
TREE_LEVEL = 0;
}
-DISPLAY_LINE
-{
- CHANNEL = "en";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 3;
- TREE_LEVEL = 0;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "CO";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 4;
- TREE_LEVEL = 0;
-}
-
DISPLAY_LINE
{
CHANNEL = "in0";
EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 5;
+ RADIX = Unsigned;
+ TREE_INDEX = 3;
TREE_LEVEL = 0;
- CHILDREN = 6, 7, 8, 9;
+ CHILDREN = 4, 5, 6, 7;
}
DISPLAY_LINE
{
CHANNEL = "in0[3]";
EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 6;
+ RADIX = Unsigned;
+ TREE_INDEX = 4;
TREE_LEVEL = 1;
- PARENT = 5;
+ PARENT = 3;
}
DISPLAY_LINE
{
CHANNEL = "in0[2]";
EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 7;
+ RADIX = Unsigned;
+ TREE_INDEX = 5;
TREE_LEVEL = 1;
- PARENT = 5;
+ PARENT = 3;
}
DISPLAY_LINE
{
CHANNEL = "in0[1]";
EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 8;
+ RADIX = Unsigned;
+ TREE_INDEX = 6;
TREE_LEVEL = 1;
- PARENT = 5;
+ PARENT = 3;
}
DISPLAY_LINE
{
CHANNEL = "in0[0]";
EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 9;
+ RADIX = Unsigned;
+ TREE_INDEX = 7;
TREE_LEVEL = 1;
- PARENT = 5;
+ PARENT = 3;
}
DISPLAY_LINE
{
CHANNEL = "in1";
EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 10;
+ RADIX = Signed;
+ TREE_INDEX = 8;
TREE_LEVEL = 0;
- CHILDREN = 11, 12, 13, 14;
+ CHILDREN = 9, 10, 11, 12;
}
DISPLAY_LINE
{
CHANNEL = "in1[3]";
EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 11;
+ RADIX = Signed;
+ TREE_INDEX = 9;
TREE_LEVEL = 1;
- PARENT = 10;
+ PARENT = 8;
}
DISPLAY_LINE
{
CHANNEL = "in1[2]";
EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 12;
+ RADIX = Signed;
+ TREE_INDEX = 10;
TREE_LEVEL = 1;
- PARENT = 10;
+ PARENT = 8;
}
DISPLAY_LINE
{
CHANNEL = "in1[1]";
EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 13;
+ RADIX = Signed;
+ TREE_INDEX = 11;
TREE_LEVEL = 1;
- PARENT = 10;
+ PARENT = 8;
}
DISPLAY_LINE
{
CHANNEL = "in1[0]";
EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 14;
+ RADIX = Signed;
+ TREE_INDEX = 12;
TREE_LEVEL = 1;
- PARENT = 10;
+ PARENT = 8;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "clr";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 13;
+ TREE_LEVEL = 0;
}
DISPLAY_LINE
@@ -1021,18 +1048,126 @@ DISPLAY_LINE
CHANNEL = "load";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
+ TREE_INDEX = 14;
+ TREE_LEVEL = 0;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "en";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
TREE_INDEX = 15;
TREE_LEVEL = 0;
}
+DISPLAY_LINE
+{
+ CHANNEL = "CO";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 16;
+ TREE_LEVEL = 0;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "seg";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 17;
+ TREE_LEVEL = 0;
+ CHILDREN = 18, 19, 20, 21, 22, 23, 24, 25;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "seg[7]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 18;
+ TREE_LEVEL = 1;
+ PARENT = 17;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "seg[6]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 19;
+ TREE_LEVEL = 1;
+ PARENT = 17;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "seg[5]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 20;
+ TREE_LEVEL = 1;
+ PARENT = 17;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "seg[4]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 21;
+ TREE_LEVEL = 1;
+ PARENT = 17;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "seg[3]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 22;
+ TREE_LEVEL = 1;
+ PARENT = 17;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "seg[2]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 23;
+ TREE_LEVEL = 1;
+ PARENT = 17;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "seg[1]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 24;
+ TREE_LEVEL = 1;
+ PARENT = 17;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "seg[0]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 25;
+ TREE_LEVEL = 1;
+ PARENT = 17;
+}
+
DISPLAY_LINE
{
CHANNEL = "out0";
EXPAND_STATUS = COLLAPSED;
RADIX = Unsigned;
- TREE_INDEX = 16;
+ TREE_INDEX = 26;
TREE_LEVEL = 0;
- CHILDREN = 17, 18, 19, 20;
+ CHILDREN = 27, 28, 29, 30;
}
DISPLAY_LINE
@@ -1040,106 +1175,6 @@ DISPLAY_LINE
CHANNEL = "out0[3]";
EXPAND_STATUS = COLLAPSED;
RADIX = Unsigned;
- TREE_INDEX = 17;
- TREE_LEVEL = 1;
- PARENT = 16;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "out0[2]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Unsigned;
- TREE_INDEX = 18;
- TREE_LEVEL = 1;
- PARENT = 16;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "out0[1]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Unsigned;
- TREE_INDEX = 19;
- TREE_LEVEL = 1;
- PARENT = 16;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "out0[0]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Unsigned;
- TREE_INDEX = 20;
- TREE_LEVEL = 1;
- PARENT = 16;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "out1";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Unsigned;
- TREE_INDEX = 21;
- TREE_LEVEL = 0;
- CHILDREN = 22, 23, 24, 25;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "out1[3]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Unsigned;
- TREE_INDEX = 22;
- TREE_LEVEL = 1;
- PARENT = 21;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "out1[2]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Unsigned;
- TREE_INDEX = 23;
- TREE_LEVEL = 1;
- PARENT = 21;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "out1[1]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Unsigned;
- TREE_INDEX = 24;
- TREE_LEVEL = 1;
- PARENT = 21;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "out1[0]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Unsigned;
- TREE_INDEX = 25;
- TREE_LEVEL = 1;
- PARENT = 21;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "code";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 26;
- TREE_LEVEL = 0;
- CHILDREN = 27, 28, 29, 30, 31, 32, 33;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "code[6]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
TREE_INDEX = 27;
TREE_LEVEL = 1;
PARENT = 26;
@@ -1147,9 +1182,9 @@ DISPLAY_LINE
DISPLAY_LINE
{
- CHANNEL = "code[5]";
+ CHANNEL = "out0[2]";
EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
+ RADIX = Unsigned;
TREE_INDEX = 28;
TREE_LEVEL = 1;
PARENT = 26;
@@ -1157,9 +1192,9 @@ DISPLAY_LINE
DISPLAY_LINE
{
- CHANNEL = "code[4]";
+ CHANNEL = "out0[1]";
EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
+ RADIX = Unsigned;
TREE_INDEX = 29;
TREE_LEVEL = 1;
PARENT = 26;
@@ -1167,22 +1202,122 @@ DISPLAY_LINE
DISPLAY_LINE
{
- CHANNEL = "code[3]";
+ CHANNEL = "out0[0]";
EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
+ RADIX = Unsigned;
TREE_INDEX = 30;
TREE_LEVEL = 1;
PARENT = 26;
}
+DISPLAY_LINE
+{
+ CHANNEL = "out1";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Unsigned;
+ TREE_INDEX = 31;
+ TREE_LEVEL = 0;
+ CHILDREN = 32, 33, 34, 35;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "out1[3]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Unsigned;
+ TREE_INDEX = 32;
+ TREE_LEVEL = 1;
+ PARENT = 31;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "out1[2]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Unsigned;
+ TREE_INDEX = 33;
+ TREE_LEVEL = 1;
+ PARENT = 31;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "out1[1]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Unsigned;
+ TREE_INDEX = 34;
+ TREE_LEVEL = 1;
+ PARENT = 31;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "out1[0]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Unsigned;
+ TREE_INDEX = 35;
+ TREE_LEVEL = 1;
+ PARENT = 31;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "code";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 36;
+ TREE_LEVEL = 0;
+ CHILDREN = 37, 38, 39, 40, 41, 42, 43;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "code[6]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 37;
+ TREE_LEVEL = 1;
+ PARENT = 36;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "code[5]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 38;
+ TREE_LEVEL = 1;
+ PARENT = 36;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "code[4]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 39;
+ TREE_LEVEL = 1;
+ PARENT = 36;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "code[3]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 40;
+ TREE_LEVEL = 1;
+ PARENT = 36;
+}
+
DISPLAY_LINE
{
CHANNEL = "code[2]";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
- TREE_INDEX = 31;
+ TREE_INDEX = 41;
TREE_LEVEL = 1;
- PARENT = 26;
+ PARENT = 36;
}
DISPLAY_LINE
@@ -1190,9 +1325,9 @@ DISPLAY_LINE
CHANNEL = "code[1]";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
- TREE_INDEX = 32;
+ TREE_INDEX = 42;
TREE_LEVEL = 1;
- PARENT = 26;
+ PARENT = 36;
}
DISPLAY_LINE
@@ -1200,99 +1335,9 @@ DISPLAY_LINE
CHANNEL = "code[0]";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
- TREE_INDEX = 33;
+ TREE_INDEX = 43;
TREE_LEVEL = 1;
- PARENT = 26;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "sel";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 34;
- TREE_LEVEL = 0;
- CHILDREN = 35, 36, 37, 38, 39, 40, 41, 42;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "sel[7]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 35;
- TREE_LEVEL = 1;
- PARENT = 34;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "sel[6]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 36;
- TREE_LEVEL = 1;
- PARENT = 34;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "sel[5]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 37;
- TREE_LEVEL = 1;
- PARENT = 34;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "sel[4]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 38;
- TREE_LEVEL = 1;
- PARENT = 34;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "sel[3]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 39;
- TREE_LEVEL = 1;
- PARENT = 34;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "sel[2]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 40;
- TREE_LEVEL = 1;
- PARENT = 34;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "sel[1]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 41;
- TREE_LEVEL = 1;
- PARENT = 34;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "sel[0]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 42;
- TREE_LEVEL = 1;
- PARENT = 34;
+ PARENT = 36;
}
DISPLAY_LINE
@@ -1300,7 +1345,7 @@ DISPLAY_LINE
CHANNEL = "upd";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
- TREE_INDEX = 43;
+ TREE_INDEX = 44;
TREE_LEVEL = 0;
}
diff --git a/Quartus/v4/jyh_4490_4.qsf b/Quartus/v4/jyh_4490_4.qsf
index 73e6fa4..ccfe32d 100644
--- a/Quartus/v4/jyh_4490_4.qsf
+++ b/Quartus/v4/jyh_4490_4.qsf
@@ -57,4 +57,38 @@ set_global_assignment -name PARTITION_FITTER_PRESERVATION_LEVEL PLACEMENT_AND_RO
set_global_assignment -name PARTITION_COLOR 16764057 -section_id Top
set_global_assignment -name VERILOG_FILE jyh_4490_4_divider.v
set_global_assignment -name VECTOR_WAVEFORM_FILE Waveform.vwf
+set_location_assignment PIN_43 -to CO
+set_location_assignment PIN_89 -to clk
+set_location_assignment PIN_24 -to clr
+set_location_assignment PIN_103 -to code[0]
+set_location_assignment PIN_110 -to code[1]
+set_location_assignment PIN_106 -to code[2]
+set_location_assignment PIN_111 -to code[3]
+set_location_assignment PIN_104 -to code[4]
+set_location_assignment PIN_100 -to code[5]
+set_location_assignment PIN_112 -to code[6]
+set_location_assignment PIN_31 -to en
+set_location_assignment PIN_32 -to in0[0]
+set_location_assignment PIN_42 -to in0[1]
+set_location_assignment PIN_39 -to in0[2]
+set_location_assignment PIN_44 -to in0[3]
+set_location_assignment PIN_33 -to load
+set_location_assignment PIN_46 -to out0[0]
+set_location_assignment PIN_50 -to out0[1]
+set_location_assignment PIN_52 -to out0[2]
+set_location_assignment PIN_54 -to out0[3]
+set_location_assignment PIN_58 -to out1[0]
+set_location_assignment PIN_53 -to out1[1]
+set_location_assignment PIN_51 -to out1[2]
+set_location_assignment PIN_49 -to out1[3]
+set_location_assignment PIN_119 -to seg[0]
+set_location_assignment PIN_126 -to seg[1]
+set_location_assignment PIN_115 -to seg[2]
+set_location_assignment PIN_125 -to seg[3]
+set_location_assignment PIN_114 -to seg[4]
+set_location_assignment PIN_121 -to seg[5]
+set_location_assignment PIN_113 -to seg[6]
+set_location_assignment PIN_120 -to seg[7]
+set_location_assignment PIN_30 -to upd
+set_location_assignment PIN_90 -to clk_50m
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
\ No newline at end of file
diff --git a/Quartus/v4/jyh_4490_4_counter.v b/Quartus/v4/jyh_4490_4_counter.v
index eed2f08..50bb9ce 100644
--- a/Quartus/v4/jyh_4490_4_counter.v
+++ b/Quartus/v4/jyh_4490_4_counter.v
@@ -20,42 +20,46 @@ begin
if(load)
begin
Q<=in;
- end
- else if(co_flag)
- begin
- co<=1;
- co_flag=0;
- end
- else if(!co_flag)
co<=0;
- //正反计数
- if(upd)
- begin
- if(Q>=4'd9)
- begin
- Q<=4'd0;
- co_flag=1;
- end
- else
- begin
- Q <= Q+1;
- end
end
- else
+ else
+ begin
+ if(co_flag)
begin
- if(Q<=4'd0)
- begin
- Q<=4'd9;
- end
- else if(Q==4'd1)
- begin
- Q <= Q-1;
- co_flag=1;
- end
- else
- begin
- Q <= Q-1;
- end
+ co<=1;
+ co_flag=0;
+ end
+ else if(!co_flag)
+ co<=0;
+ //正反计数
+ if(upd)
+ begin
+ if(Q>=4'd9)
+ begin
+ Q<=4'd0;
+ co_flag=1;
+ end
+ else
+ begin
+ Q <= Q+1;
+ end
+ end
+ else
+ begin
+ if(Q<=4'd0)
+ begin
+ Q<=4'd9;
+ end
+ else if(Q==4'd1)
+ begin
+ Q <= Q-1;
+ co_flag=1;
+ end
+ else
+ begin
+ Q <= Q-1;
+ end
+ end
end
end
else
diff --git a/Quartus/v4/jyh_4490_4_divider.v b/Quartus/v4/jyh_4490_4_divider.v
index 2af85c0..4a8f4ad 100644
--- a/Quartus/v4/jyh_4490_4_divider.v
+++ b/Quartus/v4/jyh_4490_4_divider.v
@@ -1,8 +1,9 @@
module jyh_4490_4_divider(clk,clk_out);
input clk;
output reg clk_out;
- localparam TARGET=2;
- reg [15:0]counter=0;
+// localparam TARGET=100000;
+ localparam TARGET=1;
+ reg [19:0]counter=0;
initial begin
clk_out=0;
end
diff --git a/Quartus/v4/jyh_4490_4_entry.v b/Quartus/v4/jyh_4490_4_entry.v
index c06c0ee..b707fd2 100644
--- a/Quartus/v4/jyh_4490_4_entry.v
+++ b/Quartus/v4/jyh_4490_4_entry.v
@@ -1,21 +1,21 @@
-module jyh_4490_4_entry(out1, out0, code, sel, CO,
+module jyh_4490_4_entry(out1, out0, code, seg, CO,
// 十位输出 个位输出 数码管型码 数码管位码 进/借位标志位
- in1, in0, load, clk, subclk, clr, en, upd);
- // 十位装载 个位装载 装载信号 计数时钟信号 分频信号 清零信号 使能信号 正反计数标志位
+ in1, in0, load, clk, clk_50m, subclk, clr, en, upd);
+ // 十位装载 个位装载 装载信号 计数时钟信号 50M 分频信号 清零信号 使能信号 正反计数标志位
output [3:0] out1;
output [3:0] out0;
output [6:0] code;
-output [7:0] sel;
+output [7:0] seg;
output CO;
input [3:0] in1;
input [3:0] in0;
-input clk,load,clr,en,upd;
+input clk,load,clr,en,upd,clk_50m;
//分频器
output subclk;
jyh_4490_4_divider D1(
-.clk(clk),
+.clk(clk_50m),
.clk_out(subclk)
);
@@ -23,7 +23,7 @@ jyh_4490_4_divider D1(
//个位计数器
jyh_4490_4_counter C1(
.Q(out0),
-.clk(subclk),
+.clk(clk),
.co(CO),
.clr(clr),
.load(load),
@@ -34,8 +34,9 @@ jyh_4490_4_counter C1(
//十位计数器
jyh_4490_4_counter C2(
.Q(out1),
-.clk(CO||load),
+.clk(CO||(load && clk)),
.clr(clr),
+.in(in1),
.load(load),
.en(en),
.upd(upd));
@@ -45,7 +46,7 @@ jyh_4490_4_encoder E1(
.codeout(code),
.d1(out0),
.d2(out1),
-.clk(clk),
-.sel(sel[3:0])
+.clk(subclk),
+.sel(seg[3:0])
);
endmodule