From d7894d796343efb2707061c91d53b52a0dcc0a73 Mon Sep 17 00:00:00 2001 From: Raphael Jacquot Date: Tue, 12 Feb 2019 08:56:15 +0100 Subject: [PATCH] add handling of fields_f table (no decode yet) --- saturn-decoder.v | 28 +++++++++++++++++++++++----- testrom.hex | 2 +- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/saturn-decoder.v b/saturn-decoder.v index 5c3d256..c45b0b3 100644 --- a/saturn-decoder.v +++ b/saturn-decoder.v @@ -119,7 +119,9 @@ end // general variables reg continue; reg block_0x; -reg block_0Ex; +reg block_0Efx; + +reg fields_f; always @(posedge i_clk) begin @@ -148,7 +150,10 @@ always @(posedge i_clk) begin // cleanup block variables block_0x <= 0; - block_0Ex <= 0; + block_0Efx <= 0; + + // cleanup fields table variables + fields_f <= 0; // cleanup o_direction <= 0; @@ -223,7 +228,8 @@ always @(posedge i_clk) begin end endcase continue <= (i_nibble == 4'hE); - block_0Ex <= (i_nibble == 4'hE); + block_0Efx <= (i_nibble == 4'hE); + fields_f <= (i_nibble == 4'hE); o_ins_decoded <= (i_nibble != 4'hE); end @@ -233,12 +239,24 @@ always @(posedge i_clk) begin * * *****************************************************************************/ - if (continue && block_0Ex) begin - $display("block_0Ex: nibble %h not handled", i_nibble); + if (continue && block_0Efx && !fields_f) begin + $display("block_0Efx: nibble %h not handled", i_nibble); continue <= 0; o_dec_error <= 1; end + /****************************************************************************** + * + * fields f table + * + * + *****************************************************************************/ + if (continue && fields_f) begin + $display("fields_f: nibble %h not handled", i_nibble); + fields_f <= 0; + end + + end end end diff --git a/testrom.hex b/testrom.hex index 9f8f206..cdb0c6d 100644 --- a/testrom.hex +++ b/testrom.hex @@ -7,5 +7,5 @@ 0 6 // RSTK=C 0 7 // C=RSTK -0 E +0 E D F // end \ No newline at end of file