From 334a727da522f84f4f243cd743c7f29971e462fe Mon Sep 17 00:00:00 2001 From: Michael Abed Date: Wed, 21 Mar 2012 13:50:55 -0400 Subject: testing debouncer is silly --- CountdownController.v | 18 +++++++++++------- Test_ContdownController.v | 4 ++-- _xmsgs/pn_parser.xmsgs | 2 +- lab4.gise | 15 +++++++++++++++ lab4.xise | 8 ++++---- 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/CountdownController.v b/CountdownController.v index ac50bf0..35c84f9 100644 --- a/CountdownController.v +++ b/CountdownController.v @@ -50,9 +50,14 @@ wire [3:0] ado, bdo, cdo; wire [7:0] init; wire [7:0] tout; -ClockDivider dbc(.count(1_000_000), .rst(rst), .clk_in(clk), .clk_out(dbclk)); -ClockDivider sec(.count(100_000_000), .rst(rst), .clk_in(clk), .clk_out(seconds)); -ClockDivider dcc(.count(7_500_000), .rst(rst), .clk_in(clk), .clk_out(dispclk)); +//ClockDivider dbc(.count(1_000_000), .rst(rst), .clk_in(clk), .clk_out(dbclk)); +//ClockDivider sec(.count(100_000_000), .rst(rst), .clk_in(clk), .clk_out(seconds)); +//ClockDivider dcc(.count(7_500_000), .rst(rst), .clk_in(clk), .clk_out(dispclk)); + +ClockDivider dbc(.count(10), .rst(rst), .clk_in(clk), .clk_out(dbclk)); +ClockDivider sec(.count(100), .rst(rst), .clk_in(clk), .clk_out(seconds)); +ClockDivider dcc(.count(25), .rst(rst), .clk_in(clk), .clk_out(dispclk)); + debouncer dbA(.dout(a), .din(btnA), .rst(rst), .clk_1M(dbclk)); debouncer dbB(.dout(b), .din(btnB), .rst(rst), .clk_1M(dbclk)); @@ -72,8 +77,7 @@ Bin2BCD b2bcb(.hun(cdo), .ten(ado), .one(bdo), .bin(tout)); DisplayController dispcont(.result(ssdo), .AN(ANo), .A(ado), .B(bdo), .clk_in(dispclk), .rst(rst)); -always @(posedge clk) begin - ssd <= ssdo; - AN <= ANo; -end +assign ssd = ssdo; +assign AN = ANo; + endmodule diff --git a/Test_ContdownController.v b/Test_ContdownController.v index ba3b63c..7450761 100644 --- a/Test_ContdownController.v +++ b/Test_ContdownController.v @@ -64,13 +64,13 @@ module Test_ContdownController; - while (11) begin + while (1) begin clk = ~clk; #1; if (i < 100) begin i = i + 1; if (i == 50) begin for (j = 0; j < 5; j = j + 1) begin - btnA = 1; #1 + btnA = 1; #1; clk = ~clk; btnA = 0; #1; clk = ~clk; diff --git a/_xmsgs/pn_parser.xmsgs b/_xmsgs/pn_parser.xmsgs index 16c15fd..d1c52e5 100644 --- a/_xmsgs/pn_parser.xmsgs +++ b/_xmsgs/pn_parser.xmsgs @@ -8,7 +8,7 @@ -Analyzing Verilog file "/home/michael/Documents/School/EC311/lab4/CountdownController.v" into library work +Analyzing Verilog file "/home/michael/Documents/School/EC311/lab4/Test_ContdownController.v" into library work diff --git a/lab4.gise b/lab4.gise index 06772a8..b088a16 100644 --- a/lab4.gise +++ b/lab4.gise @@ -57,6 +57,10 @@ + + + + @@ -90,6 +94,11 @@ + + + + + @@ -111,7 +120,11 @@ + + + + @@ -123,6 +136,8 @@ + + diff --git a/lab4.xise b/lab4.xise index ad74d59..1ebb86f 100644 --- a/lab4.xise +++ b/lab4.xise @@ -341,8 +341,8 @@ - - + + @@ -353,14 +353,14 @@ - + - + -- cgit v1.2.3-54-g00ecf