Sunday, 2018-04-01

*** tpb has joined #yosys00:00
*** cemerick has joined #yosys00:01
*** cemerick_ has joined #yosys00:04
*** cemerick has quit IRC00:08
*** cemerick_ has quit IRC00:49
*** digshadow has quit IRC01:10
*** digshadow has joined #yosys01:10
*** promach_ has joined #yosys01:20
*** promach_ has quit IRC01:22
*** promach_ has joined #yosys01:34
*** emeb has quit IRC02:03
*** emeb_mac has joined #yosys02:14
*** promach_ has quit IRC02:22
*** promach_ has joined #yosys02:22
*** promach_ has quit IRC02:42
*** jkiv has joined #yosys03:53
*** jkiv has quit IRC04:35
*** Guest53095 has quit IRC05:56
*** jophish has joined #yosys05:56
*** xerpi has joined #yosys06:06
*** jophish has quit IRC06:07
*** jophish has joined #yosys06:08
*** AlexDaniel has quit IRC07:08
*** xerpi has quit IRC07:16
*** emeb_mac has quit IRC07:39
*** dys has joined #yosys09:10
*** dmin7 has joined #yosys09:51
*** leviathan has joined #yosys09:57
janrinzeZipCPU: i noticed that the ZipCPU should be able to run at 40MHz on the IcoBoard. The timings for my own cpu design show that 16x16 multiply is around 40 ns. how did you manage 32 bit at 40 MHz?10:19
ravenexpnot all cpus do mul in a single cycle11:06
ravenexpwell, most don't11:06
*** eduardo__ has joined #yosys11:08
*** cemerick_ has joined #yosys11:09
*** eduardo_ has quit IRC11:12
*** sklv has quit IRC11:13
ZipCPUThe ZipCPU will do a multiply in 1-4 cycles, depending on how you set up the code.  7-series can usually do 3 cycles IIRC, Spartan 6's require 4.11:16
ZipCPUThe iCE40 design can't handle either, so the multiply instruction is an illegal instruction on that design.11:16
ZipCPUI'm hoping to trap it and replace it with a soft multiply ... I just haven't gotten that far.11:17
ravenexpZipCPU: are you using DSP macros in xilinx?11:18
ZipCPUDSP's yes, macros no.11:18
ZipCPUYou can check out this portion of the design if you want.  It's (currently) in https://github.com/ZipCPU/zipcpu/blob/master/rtl/cpu/cpuops.v11:19
ZipCPUThere's a large section there that handles multiplies.11:19
ZipCPUI'm in the process of pulling this out into its own file, but ...  that's where it's at currently.11:20
ravenexpI get 40411:20
ZipCPUAh, let me try again ... https://github.com/ZipCPU/zipcpu/blob/master/rtl/core/cpuops.v11:20
tpbTitle: zipcpu/cpuops.v at master · ZipCPU/zipcpu · GitHub (at github.com)11:20
ravenexpand now it works11:22
ZipCPUOn the iCE40 the OPT_MULTIPLY option is set to zero, bypassing the multiply code11:23
ravenexpis xst able to make sense of this?11:25
ravenexplike infer 18x18 multipliers the dsp blocks have?11:26
ZipCPUxst uses the last one, and yes it can make sense of it11:26
ravenexpif I were making a soft CPU, I'd implement 18x18 muls in the hard blocks, and trap on anything larger11:28
ravenexpbecause I hate programmers11:28
ravenexpno hw division for them, either11:28
janrinzeZipCPU: Thanks for the clarification.11:28
*** sklv has joined #yosys11:29
ZipCPUOh, and as for the 40MHz ... the CPU will need to run at 50MHz on the icoBoard I'm running it on, and it can actually make that number.11:30
ZipCPU40 is a leftover from trying to find a bug, and it won't work with the SRAM on the icoBoard--something I haven't added to the design yet.11:31
ravenexpI wonder how many prorammers even know that bits [63:32] of the result exist11:31
janrinzeZipCPU: i can only manage around 33 MHz with my own CPU design..11:32
janrinzeZipCPU: is that number with using a cache?11:32
ZipCPUravenexp: GCC knows.11:32
ZipCPUCouldn't fit the cache on the icoBoard11:33
ZipCPUAlthough ... the cache is one of my faster components--will run at 200MHz on a series 7, even though the ALU slows me down to 100 or so11:33
janrinzeOkay, so no cache.. I have the memory shared between vga and cpu so that limits the bandwidth a bit to SRAM.11:34
ravenexpthere's been exactly 0 times I saw our programmers doing anything other than 32x32->32 muls or even bothering to check for overflow11:34
ZipCPULibrary code requires 64-bit support.11:34
ravenexpthat could be handled with software emulation like divisions11:35
*** ravenexp has quit IRC12:13
*** ravenexp has joined #yosys12:17
ZipCPUI suppose12:24
*** GuzTech has joined #yosys12:52
*** promach_ has joined #yosys14:13
*** jkiv has joined #yosys14:15
*** jkiv has joined #yosys14:16
*** jkiv has quit IRC14:17
*** jkiv has joined #yosys14:17
*** dmin7 has quit IRC14:23
*** jkiv has quit IRC14:59
*** proteusguy has quit IRC15:12
*** proteusguy has joined #yosys15:14
*** emeb has joined #yosys15:45
*** promach_ has quit IRC17:47
janrinzeZipCPU: How did you get a compiler for your CPU?18:53
ZipCPUI used GCC, and built the backend myself.18:54
janrinzeZipCPU: I resorted to writing my own compiler.. hope that the target system will be able to compile code for itself..18:54
janrinzeZipCPU: using gcc implicitly imposes a lot of things to be supported by the cpu, right?18:55
ZipCPUSuch as ...?18:55
janrinzeokay.. perhaps i was mistaken there.18:57
janrinzei've only built a 16 bit cpu which does not have many instructions.18:57
ZipCPUGCC supports other 16-bit architectures.18:58
janrinze16 bit pointers..18:58
ZipCPUI'll also point out, I needed to change the ISA to get linking to work ... ;)18:58
janrinzeso max 64KB range.18:58
ZipCPUSure!18:58
ZipCPUThe ZipCPU originally supported only 32-bit bytes.  Getting that to work with GCC was my first success.18:59
ZipCPUIt now supports 8-bit bytes, so GCC support is a bit simpler.18:59
janrinze16 bit bytes here :-)18:59
qu1j0t3ZipCPU: did you do a writeup on the gcc backend?18:59
ZipCPUNo, not yet.  I've wanted to.  It's on my to do list.  I'm just not quite certain how to dip into it without going into it whole hog--if you know what I mean.19:00
awyglehappy easter, ZipCPU19:01
qu1j0t3yeah, i'm sure it's a big project. a lot of people would benefit though19:01
ZipCPUThe other problem is ... I'm not sure to what extent an FPGA programmer would want to dive into GCC internals.  CPU designers, definitely, general FPGA designers?  I'm not certain.19:02
ZipCPUawygle: Happy resurrection day!  Thank you, awygle.  http://zipcpu.com/bog/2018/04/01/resurrection-day.html !19:02
qu1j0t3people doing backends for historical cpus are definitely out there19:02
janrinzeyup. understand that.19:02
awyglejanrinze: the msp430 backend is actively supported and that's a 16-bit architecture (except when it's 20-bit but never mind)19:03
ZipCPUAlso ... I think I want to merge the ZipCPU into GCC mainline.  That means I need to go into binutils mainline first, and in particular I'll need to clean up my assembler backend ... lots of work.19:03
janrinzehence i resorted to writing my own compiler. I was able to write that in 2 weeks. I doubt i could finish reading up on gcc internals in two weeks..19:03
ZipCPUIt took me about 2-3 months to build a GCC backend.19:03
qu1j0t3ZipCPU: that would be really nice, but will they merge it? They have been known to yank real, important cpus19:03
ZipCPUThen another 2-months to rewrite it for 8-bit bytes ...19:04
ZipCPUqu1j0t3: Good question.  Not sure I really know the answer.  It'd be nice to know.19:04
ZipCPUI guess all I can do is ask when I get to that point.19:04
janrinzeZipCPU: with gcc it means that C++ can be used too?19:04
ZipCPUBasically, although I don't really have a good and thorough test suite to know.19:05
*** dys has quit IRC19:05
ZipCPUI mean ... the back end I've built should theoretically support every front end.  However, I haven't tested them all, and each front end uses the back end differently so ...19:06
ZipCPULet me try things this way ... you are invited to experiment with the ZipCPU's back end and your favorite language.  If it doesn't work, let me know and we can look at it together.  :D19:07
janrinzeIf i can find time to look at the ZipCPU then I will let you know. For now I am indulging myself in this whole computer-from-scratch experience. ;-)19:08
ZipCPUjanrinze: Enjoy!  You might argue that the ZipCPU was just exactly that from my perspective.  There's a *lot* of road, though, between the drawing board and playing 4x4x4 tic-tac-toe using the C-library.19:09
janrinzeyes. I am now doing some graphics demos as test bench19:10
ZipCPUDid you find my VGA simulator at all?19:10
ZipCPUIt's more of a display simulator than a VGA simulator ... but I named it a VGA simulator, and the name has held.19:10
janrinzeI started with an Acorn Atom in-a-fpga some two years ago.19:11
awygleAda-on-ZipCPU19:11
janrinzeso i could easily swap the 6502 cpu there with a new cpu.19:11
ZipCPU:D19:11
*** cr1901 has quit IRC19:11
ZipCPUawygle: Are you just trying to get me started?   :P19:11
ZipCPUjanrinze: There was a wonderful O/S text on OpenCores.  When I wrote to the author to tell him how much I loved reading through it, he said that though he had built his own ISA for his CPU at first, he stopped doing it.19:12
ZipCPUThere was just too much work involved in maintaining the port of the tools19:12
janrinzeoh, but of course.19:13
awygleZipCPU: get you started learning ada so you can help get ghdl support into yosys? maybe.19:13
ZipCPUawygle: Would you believe that I originally wrote the F-16 flight sim for my masters degree thesis in Ada?19:13
janrinzetechnically a 64K-word system won't run much stuff you can grab in c-sources.19:14
ZipCPUjanrinze: There was also a fascinating comment in the GCC soft FPU emulation code: "Here's a quarter kid, go get yourself a real CPU"19:15
ZipCPUThis was the error message if you tried to compile the FPU emulation on a machine that didn't support 4-byte integers.19:15
janrinzetrue that.. even a cortex M-0 does not have FPU..19:15
janrinzeback in '97 we could hardly get gcc to produce code for the ARM without doing some inline assembly to fixup things..19:19
janrinzethe ARM sprouted from the legacy Acorn Atom and it's siblings. so to me this is sort of a walk through alternative time line. ;-)19:22
janrinzeZipCPU: have you tried the ulp5K yet?19:31
*** pie___ has joined #yosys19:49
*** digshadow has quit IRC19:52
*** pie__ has quit IRC19:53
*** cr1901_modern has joined #yosys19:54
*** AlexDaniel has joined #yosys20:05
*** digshadow has joined #yosys20:07
ZipCPUjanrinze: Nope, not yet20:30
*** leviathan has quit IRC22:04
*** emeb has quit IRC22:15
*** emeb_mac has joined #yosys22:29
*** emeb_mac has quit IRC22:30
*** GuzTech has quit IRC22:41
*** danieljabailey has quit IRC23:03
*** danieljabailey has joined #yosys23:03
*** _whitelogger has quit IRC23:54
*** _whitelogger has joined #yosys23:56

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!