summaryrefslogtreecommitdiff
path: root/hdl/command_parser.sv
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--hdl/command_parser.sv12
1 files changed, 9 insertions, 3 deletions
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
91 end 91 end
92 92
93 READ_ADDRESS: if (input_byte_valid) begin 93 READ_ADDRESS: if (input_byte_valid) begin
94 if (input_byte >= "0" && input_byte <= "9") begin 94 if (input_byte == ":") begin
95 // ignore
96 end else if (input_byte >= "0" && input_byte <= "9") begin
95 command_data.address = command_data.address << 4; 97 command_data.address = command_data.address << 4;
96 command_data.address[$clog2(`RAM_LINE_WORDS)+:4] = input_byte - "0"; 98 command_data.address[$clog2(`RAM_LINE_WORDS)+:4] = input_byte - "0";
97 end else if (input_byte >= "a" && input_byte <= "f") begin 99 end else if (input_byte >= "a" && input_byte <= "f") begin
@@ -109,7 +111,9 @@ module command_parser
109 READ_DATA: if (input_byte_valid) begin 111 READ_DATA: if (input_byte_valid) begin
110 automatic bit [$bits(command_data.data)-1:0] flat_data = command_data.data; 112 automatic bit [$bits(command_data.data)-1:0] flat_data = command_data.data;
111 flat_data = flat_data << 4; 113 flat_data = flat_data << 4;
112 if (input_byte >= "0" && input_byte <= "9") begin 114 if (input_byte == ":") begin
115 // ignore
116 end else if (input_byte >= "0" && input_byte <= "9") begin
113 flat_data[3:0] = input_byte - "0"; 117 flat_data[3:0] = input_byte - "0";
114 command_data.data = flat_data; 118 command_data.data = flat_data;
115 end else if (input_byte >= "a" && input_byte <= "f") begin 119 end else if (input_byte >= "a" && input_byte <= "f") begin
@@ -126,7 +130,9 @@ module command_parser
126 end 130 end
127 131
128 READ_ZERO_COUNT: if (input_byte_valid) begin 132 READ_ZERO_COUNT: if (input_byte_valid) begin
129 if (input_byte >= "0" && input_byte <= "9") begin 133 if (input_byte == ":") begin
134 // ignore
135 end else if (input_byte >= "0" && input_byte <= "9") begin
130 zero_count = zero_count << 4; 136 zero_count = zero_count << 4;
131 zero_count[3:0] = input_byte - "0"; 137 zero_count[3:0] = input_byte - "0";
132 end else if (input_byte >= "a" && input_byte <= "f") begin 138 end else if (input_byte >= "a" && input_byte <= "f") begin