sb0 changed the topic of #m-labs to: https://m-labs.hk :: Logs http://irclog.whitequark.org/m-labs :: Due to spam bots, only registered users can talk. See: https://freenode.net/kb/answer/registration
<mithro> What is the correct way to make a register which is reversed or another register?
futarisIRCcloud has joined #m-labs
<cr1901_modern> mithro: For loop assigning each bit position in the source reg to the reverse of the dest register. In principle, Cat() should support iterating backwards, but no synthesizer will accept the output Verilog.
mauz555 has quit [Remote host closed the connection]
<lkcl> could always use a python for-loop to manually construct a list l and then use Cat(*l)
<lkcl> using len could even make it generic
<lkcl> l = []
<lkcl> for i in range(len(srcreg)):
<lkcl> l.append(srcreg[len(srcreg)-i])
<lkcl> destreg = Signal.like(srcreg)
<lkcl> destreg.eq(Cat(*l))
<lkcl> mithro: that should do the trick, in a generic way
<lkcl> can you tell i really don't like python list INcomprehension? :)
<cr1901_modern> sb0: https://github.com/m-labs/migen/pull/164 Should be ready, I addressed everything you asked for.
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 250 seconds]
_whitelogger has joined #m-labs
rohitksingh has joined #m-labs
lkcl has quit [Ping timeout: 268 seconds]
lkcl has joined #m-labs
<kbeckmann> could you do srcreg[::-1] or will that just become some strange garbage?
<GitHub-m-labs> [migen] whitequark pushed 1 new commit to master: https://github.com/m-labs/migen/commit/3fc11b5a1dc1e66fa5997dd2124908ae34e3e1e3
<GitHub-m-labs> migen/master 3fc11b5 Adam Greig: build/lattice/icestorm: update package list for iCE40-HX8K.
<bb-m-labs> build #344 of migen is complete: Failure [failed python_unittest] Build details are at http://buildbot.m-labs.hk/builders/migen/builds/344 blamelist: Adam Greig <adam@adamgreig.com>
rohitksingh has quit [Ping timeout: 245 seconds]
rohitksingh has joined #m-labs
futarisIRCcloud has joined #m-labs
rohitksingh has quit [Ping timeout: 250 seconds]
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
rohitksingh has joined #m-labs
lkcl has quit [Read error: Connection reset by peer]
lkcl has joined #m-labs
rohitksingh has quit [Ping timeout: 240 seconds]
<mithro> whitequark: Do you have an example of a test which read/writes to csr registers / wishbone bus / SRAM memory?
<whitequark> mithro: context?
<mithro> whitequark: Simulation tests in migen
<whitequark> errr, let me show you the API
<mithro> whitequark: Basically, I want to test writing to the CSR registers and having the thing respond as I expect...
<whitequark> yeah, gimme a sec
<mithro> whitequark: Would also be good if you had any example of filling sram with data
<whitequark> mithro: yeah
<whitequark> so for CSRs
<whitequark> you can just do `yield from some.mod.csr.read()`
<whitequark> and `yield from some.mod.csr.write(x)`
<whitequark> you can look at their implementations in misoc/interconnect/csr.py
<mithro> whitequark: Do you have an example of multiple clock domains with simulation at all?
AceChen has quit [Ping timeout: 246 seconds]
acathla has quit [Remote host closed the connection]
AceChen has joined #m-labs
acathla has joined #m-labs
acathla has quit [Changing host]
acathla has joined #m-labs
AceChen has quit [Ping timeout: 250 seconds]
<whitequark> not offhand
<lkcl> so i'm looking at the verilog.py generator and it doesn't look like there's a way to generate "parameters"
<whitequark> like localparam?
AceChen has joined #m-labs
<lkcl> yes
<lkcl> output reg `fetch_output_state output_state
<lkcl> );
<lkcl> parameter mtvec = 32'hXXXXXXXX;
<lkcl> parameter reset_vector = 32'hXXXXXXXX;
<lkcl> however Instance you *can* pass *in* parameters
<whitequark> yeah
<whitequark> that's accurate
<lkcl> would simply passing in the "parameters" as input variables do the trick, do you think?
<lkcl> or, should i cheat and pass them in as python class __init__ parameters? :)
AceChen has quit [Ping timeout: 245 seconds]
<lkcl> i'm going to just treat them as module inputs, see how i get on, as i want to make use of Instance rather than have one huge verilog file
AceChen has joined #m-labs