diff --git a/Quartus/v4/Waveform.vwf b/Quartus/v4/Waveform.vwf
index 2428555..2e42972 100644
--- a/Quartus/v4/Waveform.vwf
+++ b/Quartus/v4/Waveform.vwf
@@ -22,6 +22,7 @@ run -all
quit -f
+
onerror {exit -code 1}
vlib work
@@ -42,6 +43,7 @@ run -all
quit -f
+
verilog
*/
@@ -916,17 +918,17 @@ DISPLAY_LINE
DISPLAY_LINE
{
- CHANNEL = "code";
+ CHANNEL = "in0";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
TREE_INDEX = 5;
TREE_LEVEL = 0;
- CHILDREN = 6, 7, 8, 9, 10, 11, 12;
+ CHILDREN = 6, 7, 8, 9;
}
DISPLAY_LINE
{
- CHANNEL = "code[6]";
+ CHANNEL = "in0[3]";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
TREE_INDEX = 6;
@@ -936,7 +938,7 @@ DISPLAY_LINE
DISPLAY_LINE
{
- CHANNEL = "code[5]";
+ CHANNEL = "in0[2]";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
TREE_INDEX = 7;
@@ -946,7 +948,7 @@ DISPLAY_LINE
DISPLAY_LINE
{
- CHANNEL = "code[4]";
+ CHANNEL = "in0[1]";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
TREE_INDEX = 8;
@@ -956,7 +958,7 @@ DISPLAY_LINE
DISPLAY_LINE
{
- CHANNEL = "code[3]";
+ CHANNEL = "in0[0]";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
TREE_INDEX = 9;
@@ -964,94 +966,14 @@ DISPLAY_LINE
PARENT = 5;
}
-DISPLAY_LINE
-{
- CHANNEL = "code[2]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 10;
- TREE_LEVEL = 1;
- PARENT = 5;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "code[1]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 11;
- TREE_LEVEL = 1;
- PARENT = 5;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "code[0]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 12;
- TREE_LEVEL = 1;
- PARENT = 5;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "in0";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 13;
- TREE_LEVEL = 0;
- CHILDREN = 14, 15, 16, 17;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "in0[3]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 14;
- TREE_LEVEL = 1;
- PARENT = 13;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "in0[2]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 15;
- TREE_LEVEL = 1;
- PARENT = 13;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "in0[1]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 16;
- TREE_LEVEL = 1;
- PARENT = 13;
-}
-
-DISPLAY_LINE
-{
- CHANNEL = "in0[0]";
- EXPAND_STATUS = COLLAPSED;
- RADIX = Binary;
- TREE_INDEX = 17;
- TREE_LEVEL = 1;
- PARENT = 13;
-}
-
DISPLAY_LINE
{
CHANNEL = "in1";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
- TREE_INDEX = 18;
+ TREE_INDEX = 10;
TREE_LEVEL = 0;
- CHILDREN = 19, 20, 21, 22;
+ CHILDREN = 11, 12, 13, 14;
}
DISPLAY_LINE
@@ -1059,9 +981,9 @@ DISPLAY_LINE
CHANNEL = "in1[3]";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
- TREE_INDEX = 19;
+ TREE_INDEX = 11;
TREE_LEVEL = 1;
- PARENT = 18;
+ PARENT = 10;
}
DISPLAY_LINE
@@ -1069,9 +991,9 @@ DISPLAY_LINE
CHANNEL = "in1[2]";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
- TREE_INDEX = 20;
+ TREE_INDEX = 12;
TREE_LEVEL = 1;
- PARENT = 18;
+ PARENT = 10;
}
DISPLAY_LINE
@@ -1079,9 +1001,9 @@ DISPLAY_LINE
CHANNEL = "in1[1]";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
- TREE_INDEX = 21;
+ TREE_INDEX = 13;
TREE_LEVEL = 1;
- PARENT = 18;
+ PARENT = 10;
}
DISPLAY_LINE
@@ -1089,9 +1011,9 @@ DISPLAY_LINE
CHANNEL = "in1[0]";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
- TREE_INDEX = 22;
+ TREE_INDEX = 14;
TREE_LEVEL = 1;
- PARENT = 18;
+ PARENT = 10;
}
DISPLAY_LINE
@@ -1099,7 +1021,7 @@ DISPLAY_LINE
CHANNEL = "load";
EXPAND_STATUS = COLLAPSED;
RADIX = Binary;
- TREE_INDEX = 23;
+ TREE_INDEX = 15;
TREE_LEVEL = 0;
}
@@ -1108,9 +1030,9 @@ DISPLAY_LINE
CHANNEL = "out0";
EXPAND_STATUS = COLLAPSED;
RADIX = Unsigned;
- TREE_INDEX = 24;
+ TREE_INDEX = 16;
TREE_LEVEL = 0;
- CHILDREN = 25, 26, 27, 28;
+ CHILDREN = 17, 18, 19, 20;
}
DISPLAY_LINE
@@ -1118,9 +1040,9 @@ DISPLAY_LINE
CHANNEL = "out0[3]";
EXPAND_STATUS = COLLAPSED;
RADIX = Unsigned;
- TREE_INDEX = 25;
+ TREE_INDEX = 17;
TREE_LEVEL = 1;
- PARENT = 24;
+ PARENT = 16;
}
DISPLAY_LINE
@@ -1128,9 +1050,9 @@ DISPLAY_LINE
CHANNEL = "out0[2]";
EXPAND_STATUS = COLLAPSED;
RADIX = Unsigned;
- TREE_INDEX = 26;
+ TREE_INDEX = 18;
TREE_LEVEL = 1;
- PARENT = 24;
+ PARENT = 16;
}
DISPLAY_LINE
@@ -1138,9 +1060,9 @@ DISPLAY_LINE
CHANNEL = "out0[1]";
EXPAND_STATUS = COLLAPSED;
RADIX = Unsigned;
- TREE_INDEX = 27;
+ TREE_INDEX = 19;
TREE_LEVEL = 1;
- PARENT = 24;
+ PARENT = 16;
}
DISPLAY_LINE
@@ -1148,9 +1070,9 @@ DISPLAY_LINE
CHANNEL = "out0[0]";
EXPAND_STATUS = COLLAPSED;
RADIX = Unsigned;
- TREE_INDEX = 28;
+ TREE_INDEX = 20;
TREE_LEVEL = 1;
- PARENT = 24;
+ PARENT = 16;
}
DISPLAY_LINE
@@ -1158,9 +1080,9 @@ DISPLAY_LINE
CHANNEL = "out1";
EXPAND_STATUS = COLLAPSED;
RADIX = Unsigned;
- TREE_INDEX = 29;
+ TREE_INDEX = 21;
TREE_LEVEL = 0;
- CHILDREN = 30, 31, 32, 33;
+ CHILDREN = 22, 23, 24, 25;
}
DISPLAY_LINE
@@ -1168,9 +1090,9 @@ DISPLAY_LINE
CHANNEL = "out1[3]";
EXPAND_STATUS = COLLAPSED;
RADIX = Unsigned;
- TREE_INDEX = 30;
+ TREE_INDEX = 22;
TREE_LEVEL = 1;
- PARENT = 29;
+ PARENT = 21;
}
DISPLAY_LINE
@@ -1178,9 +1100,9 @@ DISPLAY_LINE
CHANNEL = "out1[2]";
EXPAND_STATUS = COLLAPSED;
RADIX = Unsigned;
- TREE_INDEX = 31;
+ TREE_INDEX = 23;
TREE_LEVEL = 1;
- PARENT = 29;
+ PARENT = 21;
}
DISPLAY_LINE
@@ -1188,9 +1110,9 @@ DISPLAY_LINE
CHANNEL = "out1[1]";
EXPAND_STATUS = COLLAPSED;
RADIX = Unsigned;
- TREE_INDEX = 32;
+ TREE_INDEX = 24;
TREE_LEVEL = 1;
- PARENT = 29;
+ PARENT = 21;
}
DISPLAY_LINE
@@ -1198,9 +1120,89 @@ 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;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "code[5]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 28;
+ TREE_LEVEL = 1;
+ PARENT = 26;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "code[4]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 29;
+ TREE_LEVEL = 1;
+ PARENT = 26;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "code[3]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 30;
+ TREE_LEVEL = 1;
+ PARENT = 26;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "code[2]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 31;
+ TREE_LEVEL = 1;
+ PARENT = 26;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "code[1]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
+ TREE_INDEX = 32;
+ TREE_LEVEL = 1;
+ PARENT = 26;
+}
+
+DISPLAY_LINE
+{
+ CHANNEL = "code[0]";
+ EXPAND_STATUS = COLLAPSED;
+ RADIX = Binary;
TREE_INDEX = 33;
TREE_LEVEL = 1;
- PARENT = 29;
+ PARENT = 26;
}
DISPLAY_LINE
diff --git a/Quartus/v4/jyh_4490_4_encoder.v b/Quartus/v4/jyh_4490_4_encoder.v
index 333571f..3f4e8ee 100644
--- a/Quartus/v4/jyh_4490_4_encoder.v
+++ b/Quartus/v4/jyh_4490_4_encoder.v
@@ -7,11 +7,11 @@ output reg [6:0] codeout; //型码
//当前位置数字
-reg [6:0] code_loc=2'b01;
+reg [6:0] code_loc;
//实验性消影
reg isEnable;
-reg [1:0] loc;
+reg [3:0] loc=4'b1000;
//循环移位
always @(posedge clk)
@@ -21,11 +21,11 @@ begin
else
begin
isEnable<=1;
- if(loc==4'b01)
+ if(loc==4'b0001)
loc=4'b10;
- else if(loc==4'b10)
+ else if(loc==4'b0010)
loc=4'b100;
- else if(loc==4'b100)
+ else if(loc==4'b0100)
loc=4'b1000;
else if(loc==4'b1000)
loc=4'b1;
@@ -39,8 +39,8 @@ begin
case (loc)
4'b0001: begin code_loc = d1; sel = 4'b0001; end
4'b0010: begin code_loc = d2; sel = 4'b0010; end
- 4'b0100: begin code_loc = d2; sel = 4'b0100; end
- 4'b1000: begin code_loc = d2; sel = 4'b1000; end
+ 4'b0100: begin code_loc = d3; sel = 4'b0100; end
+ 4'b1000: begin code_loc = d4; sel = 4'b1000; end
endcase
end
end
diff --git a/Quartus/v4/jyh_4490_4_entry.v b/Quartus/v4/jyh_4490_4_entry.v
index c9507c2..c06c0ee 100644
--- a/Quartus/v4/jyh_4490_4_entry.v
+++ b/Quartus/v4/jyh_4490_4_entry.v
@@ -12,7 +12,7 @@ input [3:0] in1;
input [3:0] in0;
input clk,load,clr,en,upd;
-
+//分频器
output subclk;
jyh_4490_4_divider D1(
.clk(clk),