From 70be5e5d83e61bb8ed2d00c9854c1847fdc7e97f Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Fri, 18 Mar 2022 08:55:20 -0700 Subject: Ignore colons on inputs; use them to separate words in output. --- hdl/command_parser.sv | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'hdl/command_parser.sv') diff --git a/hdl/command_parser.sv b/hdl/command_parser.sv index cf4fe65..964ac12 100644 --- a/hdl/command_parser.sv +++ b/hdl/command_parser.sv @@ -91,7 +91,9 @@ module command_parser end READ_ADDRESS: if (input_byte_valid) begin - if (input_byte >= "0" && input_byte <= "9") begin + if (input_byte == ":") begin + // ignore + end else if (input_byte >= "0" && input_byte <= "9") begin command_data.address = command_data.address << 4; command_data.address[$clog2(`RAM_LINE_WORDS)+:4] = input_byte - "0"; end else if (input_byte >= "a" && input_byte <= "f") begin @@ -109,7 +111,9 @@ module command_parser READ_DATA: if (input_byte_valid) begin automatic bit [$bits(command_data.data)-1:0] flat_data = command_data.data; flat_data = flat_data << 4; - if (input_byte >= "0" && input_byte <= "9") begin + if (input_byte == ":") begin + // ignore + end else if (input_byte >= "0" && input_byte <= "9") begin flat_data[3:0] = input_byte - "0"; command_data.data = flat_data; end else if (input_byte >= "a" && input_byte <= "f") begin @@ -126,7 +130,9 @@ module command_parser end READ_ZERO_COUNT: if (input_byte_valid) begin - if (input_byte >= "0" && input_byte <= "9") begin + if (input_byte == ":") begin + // ignore + end else if (input_byte >= "0" && input_byte <= "9") begin zero_count = zero_count << 4; zero_count[3:0] = input_byte - "0"; end else if (input_byte >= "a" && input_byte <= "f") begin -- cgit v1.2.3