Re: [myhdl-list] Error in user defined VHDL code& amp; quot; should show line, and column for e
Brought to you by:
jandecaluwe
From: Angel E. <ang...@gm...> - 2010-07-05 08:44:06
|
Jan Decaluwe <jan <at> jandecaluwe.com> writes: > > Angel Ezquerra wrote: > > > > > As I said you _can_ find the error. That does not mean that it > > is easy > > > > Jokes aside, not many editors support going straight to a string offset, > > which makes this error message much less useful that it could be > > in practice. > > I repeat my suggestion to check whether templating instead of > regular string processing would be an acceptable solution to you, > which would enable us to simply reuse the vast amounts of > templating work readily available. > > Start with string.Template from the standard library, probably > this is just find for our purposes. I had a quick look at the string.Template library, and it is very simple and easy to use. It seems that it would cover the regular use case, which is to connect signals to VHDL ports, very well. It also seems that it would be less error prone than direct string formatting. Since you could still generate the template string itself dynamically, I don't think that changing to the template library would be any less flexible than the current method. So I cannot see any drawbacks to your proposal. Angel |