clifford changed the topic of #yosys to: Yosys Open SYnthesis Suite: http://www.clifford.at/yosys/ -- Channel Logs: https://irclog.whitequark.org/yosys
m_w has quit [Quit: leaving]
waylon531 has quit [Ping timeout: 240 seconds]
uelen has joined #yosys
<ZipCPU> Yeehaa! I managed to formally verify a UART transmitter ... (assuming a *really* fast baud rate)
<ZipCPU> As for the formal proof of the WB/AXI bridge ... that's on going.
<ravenexp> does that mean you've proven some properties of the UART transmitter?
<ravenexp> or is there a complete format specification of how an uart is supposed to work?
<ravenexp> *formal
<azonenberg> woo formal stuff
* azonenberg has been doign more hardware verification latey but is gonna get back to Antikernel stuff in a few months and do more formal on that
jhol has quit [Quit: Coyote finally caught me]
dys has quit [Ping timeout: 260 seconds]
nrossi has joined #yosys
<promach> Fos yosys-smtbmc example at https://gist.github.com/anonymous/5dd7db8a58d6a5d4670d85b68b5151ad#file-memcmp-v-L71-L72 , could anyone describe the actual usage two lines ?
cr1901_modern has quit [Ping timeout: 248 seconds]
cr1901_modern has joined #yosys
mbuf has joined #yosys
ssb has quit [Ping timeout: 246 seconds]
proteusguy has quit [Ping timeout: 252 seconds]
leviathanch has joined #yosys
proteusguy has joined #yosys
sklv has quit [Remote host closed the connection]
sklv has joined #yosys
m_t has joined #yosys
eduardo__ has joined #yosys
eduardo_ has quit [Ping timeout: 240 seconds]
dys has joined #yosys
sklv has quit [Ping timeout: 248 seconds]
sklv has joined #yosys
qu1j0t3 has quit [Ping timeout: 260 seconds]
ssb has joined #yosys
<promach> does yosys-smtbmc support "bind" yet ?
qu1j0t3 has joined #yosys
SMDhome has joined #yosys
proteusguy has quit [Ping timeout: 240 seconds]
leviathanch has quit [Read error: Connection reset by peer]
mbuf has quit [Quit: Leaving]
AlexDaniel` has quit [Ping timeout: 240 seconds]
proteusguy has joined #yosys
<ZipCPU> promach: Does it need to?
finn has joined #yosys
mbuf has joined #yosys
finn is now known as Guest25894
<Guest25894> You should be ablel to simulate a PLL right?
Guest25894 is now known as finn_
finn_ is now known as finn__
finn__ is now known as finn_
<ZipCPU> Yes/no, depends upon what you mean by a PLL. A hardware PLL?
<ZipCPU> Or a PLL written in RTL, clocked by another clock, and executed within the body of some module?
<finn_> Basically I just looked into the sim of my _very_ simple design and saw the output clock is =z
<ZipCPU> What are you using for your simulation?
<finn_> gtkwave
<ZipCPU> No you aren't.
<ZipCPU> gtkwave is a display tool, not a simulation tool.
<ZipCPU> What are you using to create the .vcd file that gtkwave is displaying?
<finn_> iverilog
<ZipCPU> Did you create your clock within your design?
<finn_> I'll make a pastebin now
<ZipCPU> Oh, and before that, how many clocks do you have in your design?
<finn_> 1
<finn_> it's very very simple
<finn_> it's literally a clock driving a counter
<finn_> connected to some i/o
<ZipCPU> Have you seen my post on how to do this?
<finn_> how to simulate a PLL?
<ZipCPU> No, "Controlling Timing within an FPGA" (http://zipcpu.com/blog/2017/06/02/generating-timing.html)
<ZipCPU> I suppose you could use that that to "simulate" a PLL.
<ZipCPU> But ... why would you want to simulate a PLL? If your design is that simple, just use a straight clock.
<finn_> so actually I need a 60MHz clock for VGA output
<finn_> I wanted to see if the counters were correct, decided to simulate, found there was no clock
<ZipCPU> How many clocks do you need? Only the one?
<finn_> at the moment. I'm using a hx8k breakout
jhol has joined #yosys
<finn_> that's the top, I have a wrapper test bench which at the moment just drives that input clock
<finn_> created the PLL core with yosys pll tool
<finn_> icepll -i 12 -o 60 -f pll.v -m
<finn_> REFERENCECLK is driven correctly in the gtk
<finn_> PLLOUTCORE is showing as undefined
<ZipCPU> Yeah, ok, now I understand your problem.
<ZipCPU> Typically what you'll want to do is to create a toplevel design and a main design below that.
<ZipCPU> The toplevel design contains all the things, like the SB_PLL and the original clock, that cannot be simulated.
<ZipCPU> The main design contains all the things you can simulate.
<ZipCPU> You'll then create a wrapper around the main design, not the toplevel design.
<ZipCPU> Your wrapper will then create both clocks.
<ZipCPU> Sorry for my initial confusion--my background is signal processing, and I thought you wanted to synchronize to an incoming signal using your own version of a PLL.
<finn_> So what you're saying is the tools will not simulate the PLL?
<ZipCPU> I wouldn't expect them to. Tools that will simulate a PLL tend to cost much, much more. ;)
<finn_> like modelsim?
<finn_> well this is useful to know, I'll have to change my designs around a little bit
<ZipCPU> Perhaps, but I don't know if modelsim will simulate *this* PLL on this chip.
<finn_> in your experience, which is the best free verilog simulator ?
<ZipCPU> Gosh ... funny you should ask ... I *love* Verilator.
<ZipCPU> I use it for all of my simulation needs.
<finn_> interesting
<finn_> kind of on my own here learning verilog
<finn_> trying to create a VGA adaptor which isn't going well
<qu1j0t3> adapting what to what? I/m interested in vga signal generation when i eventually figure out how to program this DE0
<qu1j0t3> (it's scarily old so i don't know how successful this will be in terms of tools)
<finn_> At the moment I have a ice40-hx8k breakoutboard
<finn_> I've wired the header pins to a PMOD VGA connector
* qu1j0t3 nods
<finn_> and that pastebin above should draw me some boxes
<qu1j0t3> this Terasic TREX C1 has VGA outgoing already
<finn_> at the moment I get on my screen "unsupported format"
<qu1j0t3> ha. :)
<qu1j0t3> got a scope?
<finn_> ugh no
<finn_> well
<finn_> kind of
<finn_> someone at work gave me a logic analyser
<finn_> but it's only 24Mhz
<finn_> but I can at least see the signals are coming out of the pins
<finn_> bit stuck so thought I'd roll back and start back in simulation
<ZipCPU> Need a VGA logic simulator?
<awygle> ZipCPU has quite a few good blog posts about getting information on what's going on inside your fpga
<qu1j0t3> finn_: yeah, i guess that'd still be good for lower resolutions
<finn_> Well I understand how VGA works so I don't need a simulator, I just need to understand why that above pastebin won't work aha
m_w has joined #yosys
<ZipCPU> :LOL: Are you sure??
<ZipCPU> Do you know what a VGA simulator might offer you?
<finn_> what would it offer me
<finn_> ok go for it
<ZipCPU> So, I have a VGA simulator that checks the horizontal and vertical synch wires coming from your code, to make sure they match what they are supposed to be.
<finn_> I'll have a look
<ZipCPU> The pixels are also drawn into an X-Window (GTKMM) on your screen, so you can "see" the result your code would create.
<finn_> ok then :)
<ZipCPU> Hence, when you run your simulator within verilator, you can see the results of your code plotted on your screen.
<ZipCPU> If things don't work, you've still got the VCD file so that you can trace *every* wire.
<ZipCPU> Once you move to the actual FPGA, figuring out what the wires were doing along the way is ... more difficult/challenging.
<finn_> So verilator is more about looking at the i/o of the module than individual wires?
<finn_> and registers
<ZipCPU> Sigh. Not quite.
<ZipCPU> Verilator handles simulating Verilog components.
<ZipCPU> It is complete enough so that you can also simulate external component wires as well.
<ZipCPU> One of the problems with an iverilog approach is that, while you can simulate your design, you make struggle to simulate how your design interacts with the rest of the world.
<ZipCPU> Verilator offers you an easy C/C++ environment for creating that "rest of the world".
<ravenexp> ^^
<finn_> I see
<ravenexp> I used it to turn pin flipping back into UDP packets
<ZipCPU> I tend to communicate with my designs over TCP/IP. I have software to turn TCP streams into either UART commands for an actual board, or simulated UART commands when running a Verilator based design.
<ravenexp> I use 10BASE-T Ethernet instead of an UART
<ZipCPU> Meh ... almost all of my designs have UART's, few of them have ethernet's. Of those that do, they don't have the same ethernet controller so ... that doesn't work very well for me.
<ravenexp> my ethernet controller is a verilog core
<ravenexp> I just pull it into the project
<ravenexp> it only requires two IOs for RX and TX
<ravenexp> that's why I went with 10M ethernet
<ZipCPU> Makes sense.
<ravenexp> 100M would require a PHY
<ZipCPU> All I've got are PHY's.
<ravenexp> it's amazing how backwards compatible ethernet is
<ravenexp> I can plug a 10M device into a gigabit switch and it just works
<ZipCPU> Heheh ...
<ZipCPU> Just like the space shuttle engines and milspecs ... ;)
<finn_> Do you just need hsyync and vsync to at least get a connection with the monitor right?
<ZipCPU> I would expect so.
<finn_> same
<promach> in http://www.clifford.at/papers/2017/smtbmc-sby/slides.pdf#page=10 , what does it mean by SAT and UNSAT ?
<ravenexp> satisfiability?
<promach> and UNSAT = ?
<qu1j0t3> not satisfiable
<promach> huh ?
<qu1j0t3> as i understand it, that means the system was proved to be unsatisfiable.
<qu1j0t3> the otehr possible outcome being satisfiable (SAT).
<promach> how can UNSAT -> PASS on page 11 ?
<finn_> Do you know off the top of your head what `timescale yosys library files use?
leviathanch has joined #yosys
<ZipCPU> Is it relevant?
<ZipCPU> You can declare another timescale, if you would rather.
<ZipCPU> Remember .... only simulation depends upon the timescale. Nothing else does.
<finn_> I'm getting these really long warnings
<finn_> >> /usr/local/share/yosys/ice40/cells_sim.v:7: warning: timescale for SB_IO inherited from another file. infra/hdl/clks_sim.v:1: ...: The inherited timescale is here.
<finn_> Any idea how I stop this from happening?
<finn_> iverilog -Wall -c ./scripts/iverilog.cf -o ./build/iverilog/vga.vvp
<finn_> I build like this at the moment
<ZipCPU> Can you post the arguments etc. that you are giving yosys?
<finn_> yes I use -Wall because normally it's helpful to see if you're doing something silly
<ZipCPU> verilator -Wall -cc file.v works as well.
<finn_> I will switch to verilator, just not today
<finn_> it's extra work
<ZipCPU> ;)
<finn_> I'm just confused why it's warning me about inheritance of other timescales
<finn_> ok so here's what happens
<ZipCPU> Are you running yosys, or just iverilog?
<finn_> iverilog
<finn_> I have an iverilog.cf file
<finn_> hence:L
<finn_> iverilog -Wall -c ./scripts/iverilog.cf -o ./build/iverilog/vga.vvp
<ZipCPU> Yeah, okay, don't pass the SB_IO function to iverilog then. iverilog doesn't know what an SB_IO is.
dys has quit [Ping timeout: 258 seconds]
<finn_> OK so at the moment I have this in the .cf file:
<finn_> -l /usr/local/share/yosys/ice40/cells_sim.v
<ZipCPU> It's a component that is specific to iCE40 FPGA's only, not something associated with the Verilog standard.
<finn_> Though the cells_sim.v file is needed by iverilog right?
<ZipCPU> I haven't used iverilog enough to know. Sorry. :(
<finn_> for example when I use global buffers in my code, by passing this file, it will know what to do
<finn_> ok
<finn_> thanks for the help anyway
<finn_> I found a nice workaround for the PLL problem I originally came here for
<ZipCPU> Cool.
<finn_> Basically this:
<finn_> localparam MULT = (DIVF + 1) / ( (2**DIVQ) * (DIVR + 1) );
<finn_> #(1.0/MULT) pll_clk = ~pll_clk;
<finn_> that second line is generated for sim files only :)
<finn_> I guess the only drawback is that it assumes the pll is being driven by a clock with a frequency dictated by #1
<finn_> thanks bye :)
finn_ has quit [Quit: Page closed]
clifford has quit [Quit: Ex-Chat]
clifford has joined #yosys
mbuf has quit [Quit: Leaving]
lok[m] has quit [Ping timeout: 240 seconds]
jayaura has quit [Ping timeout: 240 seconds]
pointfree1 has quit [Ping timeout: 255 seconds]
marbler has quit [Ping timeout: 246 seconds]
swick has quit [Ping timeout: 246 seconds]
aynah[m] has quit [Ping timeout: 252 seconds]
AlexDaniel` has joined #yosys
nrossi has quit [Quit: Connection closed for inactivity]
uelen has quit [Ping timeout: 248 seconds]
philtor has quit [Remote host closed the connection]
philtor has joined #yosys
m_t has quit [Quit: Leaving]
<awygle> ZipCPU: thanks for the blog post on formal methods. Lots to digest there.
leviathanch has quit [Remote host closed the connection]
<cr1901_modern> Well this renders my blog post useless
<ZipCPU> ;D
<cr1901_modern> Well, not quite, but I don't think I can do as good of a post for beginners
aynah[m] has joined #yosys
<ZipCPU> Remember ... pictures, pictures, pictures!!
<cr1901_modern> Did you make the graphs yourself?
<ZipCPU> Absolutely!
<ZipCPU> Although, I'll admit that my tool is rather antiquated.
<cr1901_modern> It looks like inkscape
<ZipCPU> I need to learn inkscape. Inkscape has better support.
<awygle> ZipCPU: do we need to assert the clock toggling? Seems like if we assert that the inputs only change on a toggle the solver should advance the clock for us
<ZipCPU> Correct.
<ZipCPU> I just can't stand reading a vcd file with no clock toggling.
<awygle> Fair enough :-P. Although if my FIFO failed when the clock wasn't toggling I'd certainly want to know!
<ZipCPU> If thee clocks not toggling, my FIFO has already failed.
<ZipCPU> I shall humbly submit to your greatness, though, if you can get your FIFO to work with no clock.
<ZipCPU> ;P
* awygle furiously googles "asynchronous fifo"
<cr1901_modern> It's basically the only foolproof way to do clock domain crossings
<cr1901_modern> incidentally, that EE times article that every references glosses over it
<cr1901_modern> ZipCPU: I'm not sure I like the explanation of temportal induction. I'd rather say:
<cr1901_modern> "The temporal induction step assumes that all assertions hold for each state in an arbitrary set of n - 1 state transitions.
<cr1901_modern> It then proves that all asserts hold in _all_ nth states reachable from an arbitrary set of n - 1 state transitions."
<awygle> I was hoping for some cool unclocked asynchronous fifo rather than just a cross clock domain fifo.
<awygle> Didn't find anything though
<awygle> Not sure FIFOs actually make sense in that paradigm
<cr1901_modern> I mean, the Intel 8259 PIC doesn't have a clock, but it is most certainly a stateful chip
pointfree1 has joined #yosys
lok[m] has joined #yosys
swick has joined #yosys
marbler has joined #yosys
Guest64469 has joined #yosys
<ZipCPU> cr1901_modern ... I need to run, but ... is that really a better description of how induction works? I"m just quoting what I've heard so far ... hearing with little understanding.
<adityaP> When I was testing my FIFO using yosys-SMTBMC, one thing which I found was the tool was incrementing the value of write pointer (output [5:0]wr_ptr) beyond it's permissible value ( in this case 32) and was generating counter example for it. We usually constrain the input in Formal verification. But I needed to constrain my output value of wr_ptr so that my check is passed. Is constraining the output correct thing?
<ZipCPU> adityaP: Check my post at zipcpu.com. I discuss that. gtg tho
<adityaP> I will check it out. TY
ZipCPU|Laptop has joined #yosys
beefok has joined #yosys