free_electron
Junior Member level 2
I found some other threads here but they don't provide an answer. so : First things first : i'm not atlking about synthesizers / simulators but just plain source code editors.
what i am looking for in a verilog editor ( also vhdl )
1) - autocompletion Visual studio style.
if i type 'my_' there should already be a pulldownlist hovering so i can quickly pick the name i want, then hit <tab> and it completes the sentence.
Same for keywords like posedge, negedge , begin , endcase etc etc etc
I found editors that can pick up the keywords (notepad++) but not the stuff you define in the code itself.
2) radix conversion
if i write:
i want to be able to right-click the 16'd2 and select thing like : convert to binary , convert to hex or convert to decimal.
convert to binary would do this:
this would make so that if you need to flip a bit , you can swap to binary , edit the one bit and flip back to hex or decimal.
3) expansion/reduction
i right click the 4 and say : convert to hex ( 4 is assumed as decimal since there is no 'header'
it would go and look up the siz of my_registername ( beeing 15:0 ) and 'beautify the code from
or even better : assign those conversion functions to F9 F10 F11 or some other function key. the cursor is on it : bam. converted , expanded and cleaned up.
similar if i wrote
and selected decimal
it would have 'beautified' to
if i resize an array (tyically a reg or wire array) there should be a search and replace that scans for all assignments to the array and checks for misalignments. ( like warning when too much stuff is beeing crammed into the register if is shrunk the register , or if not enough is in. a listbox would be nice so i can simple doubleclick the line and fix it. similar to what studio.net 2005 has.
you immediately see the problems double click them , editor jumps there and you fix them.
4)automatic code cleanup
a code snippet
while making the logic i suddenly realise that if a is true i also need an additional condition
so i type
the moment i hit return after 'p=1;' the editor should detect that there is now more then one statement between if and else and a begin-end block is in order and thus inject it .
5) and then tons of other cleanup things like missing semicolons , commas in input/output lists etcetera.
my frustration is that , everytime i want to compile a block of logic i first have to sift through tons of typos and things like missing semicolons.
there should also be a realtime warning if you access a variable or wire that is not defined. you can of course use 'default nettype = none. but then you leave that to the compiler. compiler time is precious. the compiler sometimes runs for 10 to 15 minutes and then suddenly bombs out because of a missing semicolon somewhere ... aaarrgh. And when it compiles you have 500 warnings about size misalignments... and you can go back and clean those up as well... ( we have strict coding policies where i work : it is not allowd to let the synthesizer expand stuff. So you can not do this :
my_register <=0; If 'my_register' is 37 bits you need to write explicitly 37'd0;
Its almost 2008. So about time verilog / vhdl coders get some decent editors that programmers have enjoyed for years.
so : who knows about any editor that is capable of such features ?
what i am looking for in a verilog editor ( also vhdl )
1) - autocompletion Visual studio style.
Code:
reg [15:0] my_registername;
if i type 'my_' there should already be a pulldownlist hovering so i can quickly pick the name i want, then hit <tab> and it completes the sentence.
Same for keywords like posedge, negedge , begin , endcase etc etc etc
I found editors that can pick up the keywords (notepad++) but not the stuff you define in the code itself.
2) radix conversion
if i write:
Code:
my_registername <=16'd2;
i want to be able to right-click the 16'd2 and select thing like : convert to binary , convert to hex or convert to decimal.
convert to binary would do this:
Code:
my_registername <=16'd2; // after clicking becomes :
my_registername <=16'b0000_0000_0000_0010;
this would make so that if you need to flip a bit , you can swap to binary , edit the one bit and flip back to hex or decimal.
3) expansion/reduction
Code:
my_registername <= 4;
it would go and look up the siz of my_registername ( beeing 15:0 ) and 'beautify the code from
or even better : assign those conversion functions to F9 F10 F11 or some other function key. the cursor is on it : bam. converted , expanded and cleaned up.
Code:
my_registername <= 4;
my_registername <= 16'h0004;
similar if i wrote
Code:
my_registername <= hff;
it would have 'beautified' to
Code:
my_registername <= 16'd255;
if i resize an array (tyically a reg or wire array) there should be a search and replace that scans for all assignments to the array and checks for misalignments. ( like warning when too much stuff is beeing crammed into the register if is shrunk the register , or if not enough is in. a listbox would be nice so i can simple doubleclick the line and fix it. similar to what studio.net 2005 has.
you immediately see the problems double click them , editor jumps there and you fix them.
4)automatic code cleanup
a code snippet
Code:
if (a) q <=7;
else q<=9;
while making the logic i suddenly realise that if a is true i also need an additional condition
so i type
Code:
if (a) q <=7;
p = 1;
else q<=9;
the moment i hit return after 'p=1;' the editor should detect that there is now more then one statement between if and else and a begin-end block is in order and thus inject it .
Code:
if (a) begin
q <=7;
p = 1;
end
else q<=9;
5) and then tons of other cleanup things like missing semicolons , commas in input/output lists etcetera.
my frustration is that , everytime i want to compile a block of logic i first have to sift through tons of typos and things like missing semicolons.
there should also be a realtime warning if you access a variable or wire that is not defined. you can of course use 'default nettype = none. but then you leave that to the compiler. compiler time is precious. the compiler sometimes runs for 10 to 15 minutes and then suddenly bombs out because of a missing semicolon somewhere ... aaarrgh. And when it compiles you have 500 warnings about size misalignments... and you can go back and clean those up as well... ( we have strict coding policies where i work : it is not allowd to let the synthesizer expand stuff. So you can not do this :
my_register <=0; If 'my_register' is 37 bits you need to write explicitly 37'd0;
Its almost 2008. So about time verilog / vhdl coders get some decent editors that programmers have enjoyed for years.
so : who knows about any editor that is capable of such features ?