You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First working version of regex_coprocessor with multiple basic blocks.
Fix problem with elapsed clock cycles.
The problem arises from the fact that AXI_top once the coprocessor accept the string goes into STATUS_ACCEPTED from which it was possible to receive a new START.
If the latency introduced by the AXI interface was so high that it's not possible to overwrite the command START, with a command NOP, before the regex_coprocessor has finished is duty, the AXI_top FSM may interpret command_START in the register as a new request of performing a new regular expression matching. To avoid that STATUS_ACCEPTED and STATUS_REJECTED have a different behaviour w.r.t. STATUS_IDLE and it is no longer possible to send CMD_START as soon as the regex_coprocessor work is over. For this reason a new command(CMD_RESTART) that moves from those states, to IDLE has been introduced.
Add an overall description at the beginning of most complex modules in the design, and in some cases even illustration to better clarify component connections.
Enhance readability of re2_driver introducing enums to carry constants and method wrapper to simplify the code.
Add support in re2_driver for the new command
Add support in re2_driver to reuse previously compiled regular expressions.
//demux to drive input_pc_and_current toward correct fifo.
203
+
//to avoid a combinational loop (switches can decide to move data toward one or the other output port depending on output ready, but in principle output ready depends also on targeted fifo which is specified in data).
204
+
//conservative(certain instruction which in principle could have been stored are refused) but correct
fifo_cur_char_data_in_valid = input_pc_valid && input_pc_ready; //since for outside bb input is ready if both fifo_cur_char and fifo_next_char are ready, their valid has to take into account that to avoid that fifo_latches it
174
214
175
215
fifo_next_char_data_in_valid=1'b0;
176
216
end
177
217
else
178
218
begin
179
219
fifo_next_char_data_in = input_pc ;
180
-
fifo_next_char_data_in_valid = input_pc_valid ;
220
+
fifo_next_char_data_in_valid = input_pc_valid && input_pc_ready; //since for outside bb input is ready if both fifo_cur_char and fifo_next_char are ready, their valid has to take into account that to avoid that fifo_latches it
181
221
182
222
fifo_cur_char_data_in_valid =1'b0;
183
223
end
184
224
end
185
225
186
-
//compute the approximate latency seen outside
226
+
//compute the approximate latency seen outside thought of max between odd and even but lead to high fanout-> setup violation
227
+
//opted for a simpler computation: consider only fifo_cur_char length.
0 commit comments