Re: [myhdl-list] Strange problem, VALUES instead of symbols being toVerilog'ed
Brought to you by:
jandecaluwe
|
From: Blubaugh, D. A. <dbl...@be...> - 2008-05-07 18:18:17
|
I am glad to see that there is still development for MyHDL. I was
concerned that development had expired, since I was not seeing any new
messages being posted on the MyHDL website. I was also wondering if it
would one day be possible if MyHDL would be a timeless Python, where all
the necessary timing issues would be automatically be handled by MyHDL
generator.
Thanks,
David Blubaugh
-----Original Message-----
From: myh...@li...
[mailto:myh...@li...] On Behalf Of Jan
Decaluwe
Sent: Wednesday, May 07, 2008 10:36 AM
To: myh...@li...
Subject: Re: [myhdl-list] Strange problem,VALUES instead of symbols
being toVerilog'ed
I'm trying to understand your example:
- I see that wb is passed as a parameter, but also returned by the
module. Why is that necessary?
- what is wb? if it's a class instance, as suggested by the code, I
don't understand how you get to converted code at all. I tried it, and
toVerilog chokes on return values that are not generators or sequences
of generators.
Did you perhaps modify some of the code in _extractHierarchy.py?
Jan
Oystein Homelien wrote:
> Hello, this is my first post although I have lurked for some time.
> First of all let me say that I simply love the idea of MyHDL. The
> simplicity and power of python, direct to synthesizable verilog code..
yummie!
>
> Second I must admit that I am a newbie, so be nice with me. I have
> done some stuff with MyHDL and stumbled upon some of its (or
> verilog's?) limitations wrt verilog conversion. So far I have been
> able to work around all of them, but now I am stuck.
>
> I am adding a myhdl "uart" module to my project. The instance is in
> the file uart.py, def uart(). Here's the start of it:
>
> def uart(wb, baudclk, rxd, txd):
> wb_rst_i, wb_clk_i, wb_adr_i, wb_dat_o, wb_dat_i, wb_we_i,
wb_sel_i, wb_stb_i, wb_ack_o, wb_cyc_i
> = wb.rst_i, wb.clk_i, wb.adr_i, wb.dat_o, wb.dat_i, wb.we_i,
> wb.sel_i, wb.stb_i, wb.ack_o, wb.cyc_i ;
> char = Signal(bool(0));
> send = Signal(bool(0));
> sending = Signal(bool(0));
> send_done = Signal(bool(0));
>
> @always(wb_clk_i.posedge)
> def registers():
> wb_ack_o.next = False
> if wb_cyc_i:
> if wb_we_i:
> char.next = wb_dat_i
> send.next = True
> else:
> wb_dat_o.next = concat(intbv(0x11)[5:], rxd, send,
sending)
> wb_ack_o.next = True
>
> .. as you can see I am "exploding" a wishbone bus in the beginning,
> and then declaring some internal registers (at least this is what I am
> trying to do). But, registers() is converted into the following
verilog:
>
> always @(posedge wb_clk_i) begin: POWERSOC_I_UART_0
> uart_ack_o <= 0;
> if (uart_cyc_i) begin
> if (wb_we_o) begin
> False <= wb_dat_o; <-- LOOK HERE
> False <= 1; <-- AND HERE
> end
> else begin
> uart_dat_o <= {5'h11, rxd, False, False}; <-- AND HERE
> end
> uart_ack_o <= 1;
> end
> end
>
> .. it seems as though the _values_ of my vars are being written to
> verilog instead of the symbol names. What am I doing wrong? It only
> happens with the uart, and I have tried all kinds of strange things to
> make it work. Of course this does not synthesize (i use Xilinx'
> tools). :-)
>
> I have put a zip file with design files for you to try yourself
> (./powersoc), at http://home.powertech.no/oystein/myhdl-bug1.zip .
>
> For the record, I have tried it with the following myhdl versions:
>
> drwxr-xr-x 8 oystein oystein 4096 2008-05-07 12:51 myhdl-0.5.1dev1
> -rw-r--r-- 1 oystein oystein 768032 2008-05-07 12:50
myhdl-0.5.1dev1.tar.gz
> drwxr-xr-x 7 oystein oystein 4096 2008-05-07 12:48 myhdl-0.5c1
> -rw-r--r-- 1 oystein oystein 760268 2008-05-07 12:47
myhdl-0.5c1.tar.gz
> drwxr-xr-x 6 oystein oystein 4096 2008-05-07 12:47 myhdl-0.6dev6
> -rw-r--r-- 1 oystein oystein 156404 2008-05-07 12:46
myhdl-0.6dev6.tar.gz
> drwxr-xr-x 6 oystein oystein 4096 2008-05-07 10:24 myhdl-0.6dev8
> -rw-r--r-- 1 oystein oystein 181734 2008-05-07 10:23
> myhdl-0.6dev8.tar.gz
>
> .. i could not get it working. Hope to get some input on how to work
> around this.
>
> yours,
> oystein
>
>
> ----------------------------------------------------------------------
> --- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save
$100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com
> /javaone
--
Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com
Kaboutermansstraat 97, B-3000 Leuven, Belgium
From Python to silicon:
http://myhdl.jandecaluwe.com
------------------------------------------------------------------------
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j
avaone
_______________________________________________
myhdl-list mailing list
myh...@li...
https://lists.sourceforge.net/lists/listinfo/myhdl-list
This e-mail transmission contains information that is confidential and may be
privileged. It is intended only for the addressee(s) named above. If you receive
this e-mail in error, please do not read, copy or disseminate it in any manner.
If you are not the intended recipient, any disclosure, copying, distribution or
use of the contents of this information is prohibited. Please reply to the
message immediately by informing the sender that the message was misdirected.
After replying, please erase it from your computer system. Your assistance in
correcting this error is appreciated.
|