X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=chip.v;fp=chip.v;h=12006404f1da684b5c77e5632555219c29bffb89;hb=46a95fd39e0ef114dd837bed285f8ca6acf6bb32;hp=1ff0d50022a41d9918f528bffdb736e5379e5a9f;hpb=ffba35f814eda0a4c47af601206cf2d3ab6eab03;p=clump.git diff --git a/chip.v b/chip.v index 1ff0d50..1200640 100644 --- a/chip.v +++ b/chip.v @@ -18,7 +18,7 @@ `define DIRECTION_W 3'd6 `define DIRECTION_NW 3'd7 -module chip(input clk, input [2:0] op, input [15:0] I, input io_pin, input CS, output reg [15:0] mem_in, input [15:0] mem_out, output reg mem_write, output reg [3:0] led_out = 0); +module chip(input clk, input [2:0] op, input [15:0] I, output reg [15:0] mem_in, input [15:0] mem_out, output reg mem_write, output reg [3:0] led_out = 0); // parity is unimplemented @@ -37,19 +37,6 @@ module chip(input clk, input [2:0] op, input [15:0] I, input io_pin, input CS, o wire edge_ = I[7]; wire [3:0] cube = I[11:8]; - // OP_ROUTE - wire [5:0] cycle = I[5:0]; - wire [1:0] check = I[7:6]; - wire [3:0] xor_ = I[11:8]; - wire [2:0] snarf = I[14:12]; - wire odd = I[15]; - - // OP_RUG - wire rw = I[0]; - wire ac = I[1]; - wire news = I[2]; - wire [4:0] reg_ = I[8:4]; - // OP_LED wire mode = I[4]; wire [1:0] offset = I[1:0]; @@ -65,14 +52,13 @@ module chip(input clk, input [2:0] op, input [15:0] I, input io_pin, input CS, o reg [7:0] alu_sum = 0; reg [7:0] alu_carry = 0; reg [15:0] cube_in; - reg io; // these are not really regs reg [15:0] alu_sum_out; reg [15:0] alu_carry_out; - reg [2:0] alu_index [15:0]; + reg [2:0] alu_index [15:0]; reg [15:0] idx; @@ -114,7 +100,7 @@ module chip(input clk, input [2:0] op, input [15:0] I, input io_pin, input CS, o reg [15:0] flag_or_news; reg [15:0] news_out; - news newspaper (.news_in(latest_news), .direction(flags_addr[1:0]), .news_out(news_out)); + news newspaper (.news_in(latest_news), .direction(flags_addr[2:0]), .news_out(news_out)); assign flag_or_news = flags_addr[3] ? news_out : flags_out; @@ -135,7 +121,6 @@ module chip(input clk, input [2:0] op, input [15:0] I, input io_pin, input CS, o F <= flag_or_news; A <= mem_out; C <= mem_out; - io <= io_pin; if (bsel) B <= cube_in; end