![]() |
|
|
|
#1 |
|
Hello all,
Is there a difference between: architecture b of e is signal mysig: std_logic := '0'; begin ... end architecture b; AND, architecture b of e is signal mysig: std_logic; begin mysig <= '0'; ... end architecture b; ? Thanks in advance. -- Jacques Viviers jan |
|
|
|
|
#2 |
|
Posts: n/a
|
> architecture b of e is
> signal mysig: std_logic := '0'; > begin > ... > end architecture b; simulation shows you constant '0', systesys will result in undefined output > architecture b of e is > signal mysig: std_logic; > begin > mysig <= '0'; > ... > end architecture b; both syth and sim give you '0'. valentin tihomirov |
|
|
|
#3 |
|
Posts: n/a
|
valentin tihomirov wrote:
>>architecture b of e is >> signal mysig: std_logic := '0'; >>begin >> ... >>end architecture b; > > simulation shows you constant '0', systesys will result in undefined output > >>architecture b of e is >> signal mysig: std_logic; >>begin >> mysig <= '0'; >> ... >>end architecture b; > > both syth and sim give you '0'. > > Thanks, I have been porting some Verilog, and had lots of wire mywire = 1'b0; but Verilog doesn't have a seperate declaration area... I have translated this like the second example above. I am glad to see it is the better choice. -- JV jan |
|
|
|
#4 |
|
Posts: n/a
|
In article <brn55b$b4j$>,
jan <> wrote: >Hello all, > >Is there a difference between: > >architecture b of e is > signal mysig: std_logic := '0'; >begin > ... >end architecture b; > >AND, > >architecture b of e is > signal mysig: std_logic; >begin > mysig <= '0'; > ... >end architecture b; Yup. At time zero, mysig in the first architecture will have value '0'. For the second, it will have 'U' for a delta delay, at which point the assignment to '0' will take effect. For ASIC synthesis, the initialization to '0' might get kicked out in the first architecture, while you are tying to ground in the second. FPGAs that feature initialization without reset will tolerate the initial value in the first case. Still not recommended, though. David Jones |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I am having trouble editing a signal in a sub program. | Haai | Hardware | 0 | 08-28-2007 02:58 PM |
| Need help on Modelsim VHDL syntax? ASAP:) | kaji | General Help Related Topics | 0 | 03-14-2007 10:43 PM |
| Need help on a Modelsim VHDL Syntax? ASAP:) | kaji | Software | 0 | 03-14-2007 10:43 PM |
| IMHO, Digital SECAM video is better than Analog NTSC video | Radium | DVD Video | 167 | 10-25-2006 04:16 AM |
| Convert S-video to RF signal | Monkey Monkey | DVD Video | 10 | 01-14-2004 08:17 AM |