فهرست منبع

Fix erroneous word addressing and bring back byte addressing of mailbox. Registers now work.

Signed-off-by: Jakub Duchniewicz <j.duchniewicz@gmail.com>
Jakub Duchniewicz 2 هفته پیش
والد
کامیت
6fdb3ab5aa
1فایلهای تغییر یافته به همراه6 افزوده شده و 6 حذف شده
  1. 6 6
      projects/riscv_usb/rtl/top.v

+ 6 - 6
projects/riscv_usb/rtl/top.v

@@ -227,7 +227,7 @@ module top (
 	) mailbox_I (
 		.clk(clk_24m),
 		.rst(rst),
-		.wb_addr(wb_addr[5:2]), // use word instead of byte addressing
+		.wb_addr(wb_addr[3:0]),
 		.wb_wdata(wb_wdata),
 		.wb_rdata(wb_rdata[6]),
 		.wb_we(wb_we),
@@ -289,10 +289,10 @@ module top (
             led[0] = 1'b0;
             led[1] = 1'b0;
             led[2] = 1'b1;
-        //end else if (period1 != 0) begin
-        //    led[0] = 1'b1;
-        //    led[1] = 1'b1;
-        //    led[2] = 1'b0;
+        end else if (period1 != 0) begin
+            led[0] = 1'b1;
+            led[1] = 1'b1;
+            led[2] = 1'b1;
         end else begin
             led[0] = 1'b0;
             led[1] = 1'b0;
@@ -312,7 +312,7 @@ module top (
     always @(posedge clk_24m or posedge rst)
         if (rst) begin
             led[4] = 1'b0;
-        end else if (delay1 !=0 ) begin
+        end else if (delay1 != 0) begin
             led[4] = 1'b1;
         end else begin
             led[4] = 1'b0;