Closed Remillard closed 5 years ago
Pretty quick fix. Just needed to blank out strings for lexical analysis. Quick method addition.
There's something weird going on still with strings and beautification -- possibly in the alignment of symbols. String text like the following is getting a space inserted prior to it (note the string'(" ---
part):
-- Start a single shot collection on A. Monitor the state
test_id <= TEST1;
write_note(dbg_stream, string'(" -------------------------------------------"), C_DEBUG);
write_note(dbg_stream, string'(" --------- TEST 1 --------------------------"), C_DEBUG);
write_note(dbg_stream, string'(" ---- SINGLE BUFFER A SINGLE SHOT TEST -----"), C_DEBUG);
write_note(dbg_stream, string'(" -------------------------------------------"), C_DEBUG);
However later in the same file, the following is NOT getting the extra space:
-- End single shot collection on A. Read stats about A.
write_note(dbg_stream, string'("--------- End Collection on A -------------"), C_DEBUG);
axi_lw_bus.avalon_master_mosi(C_CTRL_REG_1_ADDR, X"00000000", axi_lw_bus_rec, dbg_stream, C_DEBUG);
write_note(dbg_stream, string'("--------- Tick Time -----------------------"), C_DEBUG);
axi_lw_bus.avalon_master_miso(C_TIME_REG_ADDR, rd_data, axi_lw_bus_rec, dbg_stream, C_DEBUG);
write_note(dbg_stream, string'("--------- Offset of Oldest A Data ---------"), C_DEBUG);
axi_lw_bus.avalon_master_miso(C_BUF_A_OFF_ADDR, rd_data, axi_lw_bus_rec, dbg_stream, C_DEBUG);
Seems to be contiguous lines with strings both starting with --...
. When the lines are separated, there's no space.
Here's another example:
write_note(dbg_stream, string'("-------------------------------------------"), C_DEBUG);
write_note(dbg_stream, string'("SIMULATION END"), C_DEBUG);
write_note(dbg_stream, string'(" -------------------------------------------"), C_DEBUG);
write_note(std_stream, string'(" -------------------------------------------"), C_DEBUG);
write_note(std_stream, string'("SIMULATION END"), C_DEBUG);
write_note(std_stream, string'("-------------------------------------------"), C_DEBUG);
This just became a very bad bug. It'll affect std_logic_vector bit strings with don't cares like this:
constant C_DISCRETES_MASK : std_logic_vector(9 downto 0) := "0 ---------";
constant C_CARB_MASK : std_logic_vector(9 downto 0) := "1 ---------";
Will try to get time to work on this ASAP.
Turned out the problem was comment alignment was triggering for text inside of strings. Solved that problem, but larger problem that literal strings are considered for space removal as well. so still hammering on it.
feature/text_mangling_refactor is a branch dedicated to cleaning up the beautification routines by puttings these methods into classes and giving myself the tools to do more sophisticated things.
So it turns out that text in strings can trigger beautification words. Notably something like
Will trigger an erroneous end string. Need to figure out a way to ignore this for matching.