]> Joshua Wise's Git repositories - fpgaboy.git/blobdiff - System.v
It works.
[fpgaboy.git] / System.v
index 40817714e138de5885341d98c866d41634db6805..00ee4ecee5d67c006b0adc276aac752eede763ed 100644 (file)
--- a/System.v
+++ b/System.v
@@ -73,7 +73,8 @@ module CoreTop(
        CPUDCM dcm (.CLKIN_IN(xtal), .CLKFX_OUT(clk));
        
        wire cclk;
        CPUDCM dcm (.CLKIN_IN(xtal), .CLKFX_OUT(clk));
        
        wire cclk;
-       IBUFG ibuf (.O(cclk), .I(switches[0]));
+//     IBUFG ibuf (.O(cclk), .I(switches[0] & clk));
+       assign cclk = clk;
 
        wire [15:0] addr;       
        wire [7:0] data;
 
        wire [15:0] addr;       
        wire [7:0] data;
@@ -82,9 +83,9 @@ module CoreTop(
        wire irq, tmrirq;
        wire [7:0] jaddr;
        wire [1:0] state;
        wire irq, tmrirq;
        wire [7:0] jaddr;
        wire [1:0] state;
-
+       
        GBZ80Core core(
        GBZ80Core core(
-               .clk(cclk),
+               .clk(clk),
                .busaddress(addr),
                .busdata(data),
                .buswr(wr),
                .busaddress(addr),
                .busdata(data),
                .buswr(wr),
@@ -107,10 +108,10 @@ module CoreTop(
                .out(seven),
                .freeze(buttons[0]),
                .periods(
                .out(seven),
                .freeze(buttons[0]),
                .periods(
-                       (state == 2'b00) ? 4'b1000 :
-                       (state == 2'b01) ? 4'b0100 :
-                       (state == 2'b10) ? 4'b0010 :
-                                          4'b0001) );
+                       (state == 2'b00) ? 4'b0010 :
+                       (state == 2'b01) ? 4'b0001 :
+                       (state == 2'b10) ? 4'b1000 :
+                                          4'b0100) );
         
        Switches sw(
                .address(addr),
         
        Switches sw(
                .address(addr),
@@ -175,7 +176,7 @@ module TestBench();
        wire [7:0] leds;
        wire [7:0] switches;
        
        wire [7:0] leds;
        wire [7:0] switches;
        
-       always #10 clk <= ~clk;
+       always #62 clk <= ~clk;
        GBZ80Core core(
                .clk(clk),
                .busaddress(addr),
        GBZ80Core core(
                .clk(clk),
                .busaddress(addr),
This page took 0.025 seconds and 4 git commands to generate.