sb0 changed the topic of #m-labs to: ARTIQ, Migen, MiSoC, Mixxeo & other M-Labs projects :: fka #milkymist :: Logs http://irclog.whitequark.org/m-labs
fengling has quit [Ping timeout: 240 seconds]
fengling has joined #m-labs
sandeepkr has quit [Ping timeout: 244 seconds]
kuldeep has quit [Ping timeout: 244 seconds]
sb0 has joined #m-labs
<sb0>
rjo, ping
rohitksingh_work has joined #m-labs
<cr1901_modern>
sb0: Is it possible to generate an output migen Verilog file with parameters? Use case is to parameterize a clock frequency in an extenal project so the serial port gets the correct constant to count up to.
<sb0>
no
<sb0>
you have python to parameterize stuff, which is much more powerful than the verilog parameters
<cr1901_modern>
Probably my best bet is to add a "manual verilog generation" mode for platforms which don't exist in Migen/LiteX
<sb0>
?
<cr1901_modern>
"manual verilog generation" mode in my project*
<sb0>
what do you mean?
fengling has quit [Ping timeout: 240 seconds]
<cr1901_modern>
I have a few litescope designs that "should be portable to any dev board" regardless of whether it exists in LiteX or not. Not all of the platforms I use exist in LiteX. Since I can't really mix LiteX and migen.build platforms, _florent_ suggested I just generate verilog for each platform I'm interested in porting to, that only exists in Migen.
<cr1901_modern>
However, if the platform DOES exist in Migen, I'd like to use it :P. Otherwise, just spit out a "generic Verilog file" that I can include in a non-migen project
<sb0>
what do you need from the platform? what are the ios to your module?
<sb0>
and how do you "port" it anyway?
<cr1901_modern>
To port, I used a modified make.py similar to the one that existed in MiSoC before the API change. The IOs to my module are a serial port, clk (which can be of varying freq), and some GPIOs via add_extension
<cr1901_modern>
sb0: This really isn't a "bug" or "something really important". It's just something I'm thinking about.
kmehall_ is now known as kmehall
fengling has joined #m-labs
fengling has quit [Ping timeout: 240 seconds]
<rjo>
sb0: pong
rohitksingh_work has quit [Read error: Connection reset by peer]
fengling has joined #m-labs
rohitksingh_work has joined #m-labs
fengling has quit [Ping timeout: 240 seconds]
fengling has joined #m-labs
FabM has joined #m-labs
fengling has quit [Ping timeout: 240 seconds]
fengling has joined #m-labs
rjo_ has joined #m-labs
fengling has quit [Ping timeout: 240 seconds]
acathla` has joined #m-labs
felix____ has joined #m-labs
kyak_ has joined #m-labs
kyak_ has joined #m-labs
acathla has quit [*.net *.split]
felix_ has quit [*.net *.split]
kyak has quit [*.net *.split]
rjo has quit [*.net *.split]
acathla` is now known as acathla
fengling has joined #m-labs
EvilSpirit has quit [Ping timeout: 240 seconds]
fengling has quit [Ping timeout: 240 seconds]
fengling has joined #m-labs
<cr1901_modern>
Ahhh, so migen.build's Pins() class accept an int... did not know that. Well, making "fake" platforms to generate Verilog is easy then.
<sb0>
how does this relate to pins being ints or not?
<cr1901_modern>
sb0: I don't have to think up dummy names for pins :P (I guess it doesn't actually affect generating dummy platforms for Verilog generation)
<cr1901_modern>
I imagine the vendor tools won't like the UCF with Pins instantiated with ints though
<_florent_>
cr1901_modern: I'm not sure this is implemented in upstream migen (I added it to generate verilog code for cores)
<cr1901_modern>
Oh...
kyak_ is now known as kyak
<cr1901_modern>
_florent_: I think you have the right idea. What I ended up doing for my litescope cores is instantiating a platform if one exists in LiteX, and also offering an option to generate platform/vendor independent Verilog code as well.
<cr1901_modern>
(sans the clock frequency)
<cr1901_modern>
I subclassed GenericPlatform, like you did in your litescope test files, added the expected I/O, and just make sure to only run get_verilog()- otherwise the build will die with NotImplemented
<cr1901_modern>
This way, the procedure for building for targets and just generating Verilog code is the same
<cr1901_modern>
sb0: Do you understand what I was trying to do now?
<sb0>
cr1901_modern, I don't understand why you would like to make builds and verilog exports the same
<sb0>
verilog exports don't really have "pins", and they don't have constraints etc.
<sb0>
they don't need a database of potential IO resources to use
<sb0>
if you want to have a similar "platform.request" API for verilog exports it's fine
<sb0>
but
<sb0>
1. it should not be called "platform"
<cr1901_modern>
For convenience/ease of creating build scripts. That's all
<sb0>
2. I don't think much or any of the infrastructure can be shared with the build system
<sb0>
it's like using "make" for solving graph problems.
<cr1901_modern>
sb0: I don't understand the graph problem analogy. It's not a huge problem if generating verilog code doesn't share the same infrastructure as building using migen.build.platform. I was just suggesting a convenience.
<cr1901_modern>
If SCons wasn't so damn allergic to Python 3, I would just be using that.
<sb0>
I'm saying it should _not_ use the same infrastructure
<cr1901_modern>
You have your reasons/would know better than I. I'll figure something out.
<cr1901_modern>
sb0: If you had a project that you wanted to use migen.build infrastructure, but also wanted the option to generate vendor-independent verilog (for unsupported boards and/or toolchains), how would you go about doing this?
rohitksingh_work has quit [Read error: Connection reset by peer]
felix____ is now known as felix_
rohitksingh has joined #m-labs
rohitksingh1 has joined #m-labs
rohitksingh has quit [Ping timeout: 276 seconds]
rohitksingh has joined #m-labs
rohitksingh1 has quit [Ping timeout: 240 seconds]
sandeepkr has joined #m-labs
kuldeep has joined #m-labs
<sb0>
migen/misoc already output vendor-independent verilog whenever possible
<sb0>
if it's using something vendor-dependent, that's because there's no other way of doing it
rohitksingh has quit [Ping timeout: 276 seconds]
<sb0>
whitequark, is the compiler handling negative delays correctly?
<whitequark>
hm, it has no special logic to address those
<whitequark>
it should, at least; if not then basic arithmetics would also be broken...
sandeepkr has quit [Ping timeout: 260 seconds]
sandeepkr has joined #m-labs
sandeepkr_ has joined #m-labs
sandeepkr has quit [Ping timeout: 244 seconds]
kuldeep has quit [Ping timeout: 260 seconds]
kuldeep has joined #m-labs
sandeepkr__ has joined #m-labs
sandeepkr_ has quit [Ping timeout: 240 seconds]
sandeepkr__ has quit [Read error: Connection reset by peer]
sandeepkr__ has joined #m-labs
felix___ has joined #m-labs
kristian1aul has joined #m-labs
felix_ has quit [Killed (tepper.freenode.net (Nickname regained by services))]