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
<GitHub181> [artiq] sbourdeauducq commented on issue #780: We'd rather not merge it because we don't want to maintain KC705+EEM support and especially not mix it with the phaser target, but it looks fine for your local tests. https://github.com/m-labs/artiq/issues/780#issuecomment-314947900
<GitHub86> [artiq] sbourdeauducq commented on issue #780: And you can reference FMC pins in Migen, see how it's done in ``nist_qc2.py``. https://github.com/m-labs/artiq/issues/780#issuecomment-314948103
<GitHub131> [artiq] sbourdeauducq commented on issue #780: Only some ICs are configured by the runtime; for those on the EEM boards, kernels are perfectly fine. https://github.com/m-labs/artiq/issues/780#issuecomment-314948961
<GitHub30> [misoc] sbourdeauducq pushed 1 new commit to master: https://git.io/vQ9cU
<GitHub30> misoc/master 33da2ae Sebastien Bourdeauducq: targets: fix sayma_amc permissions
<bb-m-labs> build #223 of misoc is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/misoc/builds/223
rohitksingh_work has joined #m-labs
froggytoad has joined #m-labs
<Ishan_Bansal> attie : ping
<Ishan_Bansal> On adding the submodule to a module, here is the error which is been coming : https://pastebin.com/kTY9Vrtd
mntng has joined #m-labs
<Ishan_Bansal> sb0: ping
<attie> can you show the module and submodule code?
<Ishan_Bansal> attie: Entrophycoder() is the submodule and RLEDatapath() is the main module.
<attie> ok
<attie> have you tried without the CEinserter annotation on the submodule?
<attie> it doesn't have any statements yet so it may get confused
<Ishan_Bansal> yup that works.
<Ishan_Bansal> but I want both to be synchronized on the same clock. Does it happen even without adding common clocks to both the modules ?
<attie> by default, everything is on the same clock
<attie> the default clock is inferred
<attie> if you want different clock regions, you have to create them manually
<Ishan_Bansal> Than what is the need of the @CEInserter ?
<attie> if you want to be able to stall a submodule from outside
<attie> for instance, in my design I have a pipeline that involves several floating point operations
<attie> @CEInserter will add a clock enable signal to all sync statements
<attie> in effect, it will add a new signal to the module: self.ce = Signal()
<attie> and then it will change all statements in self.sync to "If(ce, <original statement>)"
<attie> so e.g. if your submodule is just a simple (integer) adder, it has inputs op_a and op_b and output res
<attie> and the statement self.sync += res.eq(op_a + op_b)
<Ishan_Bansal> Also why cant we have list comprehensions in migen ?
<attie> what do you mean?
<Ishan_Bansal> like why we are restricted to write for loop in a single line in migen, unlike other programming languages ?
<attie> migen isn't a programming language
<attie> migen is a collection of python classes
<attie> you are restricted by what python allows you to do to objects
<attie> how much background do you have in python? and in verilog?
<Ishan_Bansal> What I want to say is that we are able to write so in python, however while writing inside the self.sync block writing the same block will give you an error saying all values are not migen.
<attie> yes, because you are adding elements of class migen statement to a list.
<Ishan_Bansal> I am moving to my third year, I learned verilog during one of my courses in my 3rd sem.
<attie> I think it will be easier if you understand how migen generates the verilog code
<Ishan_Bansal> and about python I often used this during my two years.
<attie> when you are writing migen, you are only ever making lists of objects.
<attie> you are writing self.sync +=
<attie> this is appending to a list.
<attie> the operator verifies that the objects you are appending are of the correct class: a migen statement.
<attie> if you try to append something that is not an object of the correct class, you will see that error.
kyak has quit []
kyak has joined #m-labs
kyak has joined #m-labs
<attie> at the end, the last thing you do in your toplevel is verilog.export(topmodule).
<attie> when you call this function, it will go through the lists comb and sync
<attie> for each element, it will generate a corresponding verilog code.
<attie> so if you say self.comb += a.eq(b+c) it will output "always @(*) begin a = b+c end"
<attie> if you say self.sync += a.eq(b+c) it will output instead "always @(posedge sys_clk) begin a = b+c end" (not quite correct syntax but you know what I mean)
<attie> actually it will also add a reset
<attie> so "always @(posedge sys_clk) begin if sys_rst then a = 1'd0 else a = b+c fi end"
<attie> something like that
<attie> the migen statements and the verilog statements are almost 1 to 1
<attie> migen is just much shorter to write, and you can use python to do more powerful parametrisation than verilog allows
<attie> but fundamentally, you just create objects that translate to these two types of lines in verilog
<attie> and you collect them in a list that the export function will iterate over
<Ishan_Bansal> Is Ok.
<attie> so simply apply the rules you know from python about what you are allowed to do to objects and it should be quite clear what happens.
<attie> for instance, see the difference between the following two statements:
<attie> self.sync += If(a, b.eq(c)).Else(b.eq(d))
<attie> self.sync += b.eq(c) if a else b.eq(d)
<attie> both are correct.
<attie> can you tell me what verilog will be generated for each?
<attie> also what can you infer about a in each case?
<Ishan_Bansal> attie: in the first case it will generate always@(posedge sys_clk) begin if (a) b=c else b=d end
<Ishan_Bansal> In the second case same code is been generated
<Ishan_Bansal> I think
<Ishan_Bansal> Because both at the core level mean the same
<GitHub144> [artiq] gkasprow commented on issue #780: @jbqubit the pin mapping is [here](https://www.dropbox.com/s/byag8j3xso7w1jg/KC705_Rev1_0_U1.ucf.xdc?dl=0) https://github.com/m-labs/artiq/issues/780#issuecomment-314998459
froggytoad has quit [Ping timeout: 260 seconds]
<attie> Ishan_Bansal: no, they are very different.
<attie> again, the key is the type of a
<attie> think thoroughly about what type the variable a will need to have for each statement for it to make sense.
<attie> you got the code for the first statement correct.
<GitHub150> [pdq] jordens tagged v3.0-rc2 at 24a0f08: https://github.com/m-labs/pdq/commits/v3.0-rc2
<GitHub194> [pdq] jordens tagged v3.0-rc1 at d1739b8: https://github.com/m-labs/pdq/commits/v3.0-rc1
mntng has quit [Ping timeout: 260 seconds]
<GitHub65> [misoc] sbourdeauducq pushed 2 new commits to master: https://git.io/vQ9Mg
<GitHub65> misoc/master 207a8d6 Sebastien Bourdeauducq: integration: smarter wishbone address allocation algorithm
<GitHub65> misoc/master 04ba4fc Sebastien Bourdeauducq: wishbone: update comment with new class name
<bb-m-labs> build #224 of misoc is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/misoc/builds/224
_whitelogger has joined #m-labs
<GitHub120> [misoc] sbourdeauducq pushed 1 new commit to master: https://git.io/vQ9Qn
<GitHub120> misoc/master c49a361 Sebastien Bourdeauducq: integration: make Wishbone address decoder generator reusable
<bb-m-labs> build #225 of misoc is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/misoc/builds/225
<sb0> bb-m-labs, force build --branch=newmisoc artiq
<bb-m-labs> build forced [ETA 36m57s]
<bb-m-labs> I'll give a shout when the build finishes
<GitHub199> [artiq] sbourdeauducq created newmisoc (+1 new commit): https://github.com/m-labs/artiq/commit/4deb5f6a4569
<GitHub199> artiq/newmisoc 4deb5f6 Sebastien Bourdeauducq: gateware: use new MiSoC Wishbone address system
<bb-m-labs> build #718 of artiq-board is complete: Failure [failed conda_build] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/718
<bb-m-labs> build #1620 of artiq is complete: Failure [failed] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/1620
<sb0> bb-m-labs, force build --branch=newmisoc artiq
<bb-m-labs> build forced [ETA 36m57s]
<bb-m-labs> I'll give a shout when the build finishes
<GitHub190> [artiq] sbourdeauducq pushed 1 new commit to newmisoc: https://github.com/m-labs/artiq/commit/0253db0421452c0eba332c424c80f4dd0d8a1200
<GitHub190> artiq/newmisoc 0253db0 Sebastien Bourdeauducq: conda: fix misoc git hash
<bb-m-labs> build #719 of artiq-board is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-board/builds/719
<bb-m-labs> build #524 of artiq-win64-test is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq-win64-test/builds/524
<bb-m-labs> build #1621 of artiq is complete: Success [build successful] Build details are at http://buildbot.m-labs.hk/builders/artiq/builds/1621
<rjo> sb0: are those changes to misoc backwards compatible or do they break stuff?
<sb0> they break SoC.add_wb_slave(), everything else is compatible, including higher level features that use add_wb_slave()
<GitHub13> [artiq] sbourdeauducq merged newmisoc into master: https://github.com/m-labs/artiq/compare/40ca951750be...0253db042145
<GitHub93> [artiq] sbourdeauducq deleted newmisoc at 0253db0: https://github.com/m-labs/artiq/commit/0253db0
<sb0> they also remove the trivial mem_decoder() function
rohitksingh_work has quit [Read error: Connection reset by peer]
<rjo> maybe we should tag+incr a misoc release then
<sb0> it's already a .dev version ...
<rjo> yes. make a 0.6 where we are now and go back to .dev
<rjo> ... where we were before those commits.
<sb0> meh, the point of .dev is you can break things
<rjo> you seem to not care at all about the actual releases
<rjo> if nobody bothers to do them the entire exercise of having them is moot
<sb0> how so? artiq-2 depends on misoc 0.3 (not 0.3.dev)
<sb0> artiq-3, when released, will depend on 0.6
<sb0> in between I find it more important to reduce the bureaucracy involved in making changes
<sb0> if we have to fix misoc bugs that affect an artiq release branch, we can create misoc 0.x.1 and so on
<sb0> this sounds good enough for me
deep-book-gk_ has joined #m-labs
deep-book-gk_ has left #m-labs [#m-labs]
froggytoad has joined #m-labs
<rjo> what about other users of migen that have been relying on features from 0.6.dev because 0.5 is half a year old and apparently abandoned?
<rjo> sb0: does the migen simulator support clocks derived from other clocks, i.e. clocks not specified in Simulator(..., clocks={..: period})?
froggytoad has quit [Ping timeout: 260 seconds]
froggytoad has joined #m-labs
froggytoad has quit [Ping timeout: 240 seconds]
<sb0> rjo, no, it doesn't
<sb0> half a year old isn't that bad. i fought with debian recently which had packages 3 years old =]
<sb0> also it's quite straightforward to move to the new function
ashafir has joined #m-labs
ashafir has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ashafir has joined #m-labs
<rjo> alsways needs to be seen in relation to the development style of the project. for misoc half a year is old.
acathla has left #m-labs ["Leaving"]
acathla has joined #m-labs
ashafir has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ashafir has joined #m-labs
ashafir has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ashafir has joined #m-labs
ashafir has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ashafir has joined #m-labs