X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=gc.v;h=302041210a72a8c786d3c7149df229a70c741093;hb=62e5ccb8304550f88f658af70a683936d47c08b2;hp=2f94a21edec9c85a3d6f7d1b31c5a365553390d3;hpb=5284821b41df368b5aa571f6ddd2440cfc2a6426;p=yule.git diff --git a/gc.v b/gc.v index 2f94a21..3020412 100644 --- a/gc.v +++ b/gc.v @@ -4,14 +4,12 @@ module GC (input clk, input clk_enable, input rst, input [15:0] Ein, output [15: reg [15:0] rom_output; reg [5:0] gostate; reg [5:0] gnstate; - reg [15:0] Ein_latched; - always @(posedge clk) begin - if(rst) - Ein_latched <= 16'b0100000000000100; // initial value of E - else if(clk_enable) - Ein_latched <= Ein; +`ifdef SIM + initial begin + gostate <= 0; end +`endif wire ga_zero_disp = rom_output[15]; wire gcop_disp = rom_output[14]; @@ -117,8 +115,8 @@ module GC (input clk, input clk_enable, input rst, input [15:0] Ein, output [15: wire [15:0] GfromP = rdP ? {3'b0, P} : 0; wire [15:0] GfromP_plus = rdP_plus ? {3'b0, P + 1} : 0; wire [15:0] GfromI = conn_i ? ram_do : 0; - wire [12:0] GAfromE = conn_ea ? Ein_latched[12:0] : 0; - wire [2:0] GTfromE = conn_et ? Ein_latched[15:13] : 0; + wire [12:0] GAfromE = conn_ea ? Ein[12:0] : 0; + wire [2:0] GTfromE = conn_et ? Ein[15:13] : 0; wire [15:0] GfromE = {GTfromE, GAfromE}; assign G = GfromR | GfromQ | GfromP | GfromP_plus | GfromI | GfromE;