]> Joshua Wise's Git repositories - fpgaboy.git/blobdiff - System.v
Hello, Z80!
[fpgaboy.git] / System.v
index 259656abe330f3d4040723c7ed544401573c6c94..8fc4c9ca7d5ac8ed490cf86e6cb7214af0dd8046 100644 (file)
--- a/System.v
+++ b/System.v
@@ -23,7 +23,7 @@ module InternalRAM(
        
        reg [7:0] ram [8191:0];
        
-       wire decode = (address >= 16'hC000) && (address < 16'hFE00);
+       wire decode = ({0,address} >= 17'hC000) && ({0,address} < 17'hFE00);
        reg [7:0] odata;
        wire idata = data;
        assign data = (rd && decode) ? odata : 8'bzzzzzzzz;
@@ -114,6 +114,13 @@ module CoreTop(
     .data(data), 
     .serial(serio)
     );
+
+  InternalRAM ram(
+               .address(addr),
+               .data(data),
+               .clk(clk),
+               .wr(wr),
+               .rd(rd));
 endmodule
 
 module TestBench();
@@ -140,12 +147,12 @@ module TestBench();
                .wr(wr),
                .rd(rd));
        
-//     InternalRAM ram(
-//             .address(addr),
-//             .data(data),
-//             .clk(clk),
-//             .wr(wr),
-//             .rd(rd));
+       InternalRAM ram(
+               .address(addr),
+               .data(data),
+               .clk(clk),
+               .wr(wr),
+               .rd(rd));
 
        wire serio;
        UART uart(
This page took 0.024416 seconds and 4 git commands to generate.