Prev: Picoblaze C compiler 1.8.4
Next: SPI slave problem
From: Antti Lukats on 19 Dec 2006 15:08 PicoBlaze C compiler has been available for some time already, but until yesterday I never tried it. But today when I type: >start build.bat then the following C file ----- cut ----- // This is first PCCOMP Program tested on MicroFpga! // Target was S3-200 with KCPSM3_256S MF-Core #include "..\inc\padmap.h" #include "..\inc\board.h" #include "..\lib\pinapi.h" unsigned int i; // Delay void ledelay() { for (i=0;i<65000;i++) {} } void main() { // blink a LED forever ! while (1) { SetPin(LED1, 0); ledelay(); SetPin(LED1, 1); ledelay(); } } ----- cut ----- generates a BIT file (without invoking synthesis or fpga implementation tools) and there is LED blinking on my desk right this moment :) KCSPM3_256S core only supports maximum 256 FPGA I/Os but its still fun the evaluation package is ready for download http://www.microfpga.com/joomla/index.php?option=com_remository&Itemid=27&func=fileinfo&id=3 it includes the MicroFpga bitstreams and compile scripts devices included: xc2v1000_fg256 xc2v250_cs144 xc2v250_fg256 xc2v250_fg456 xc2v40_cs144 xc2v40_fg256 xc2v500_fg256 xc2v80_cs144 xc2v80_fg256 xc2vp2_ff672 xc2vp2_fg256 xc2vp2_fg456 xc2vp4_fg256 xc2vp4_fg456 xc2vp7_fg456 xc3s1000_fg320 xc3s1000_ft256 xc3s200_ft256 xc3s200_pq208 xc3s200_tq144 xc3s200_vq100 xc3s400_fg320 xc3s400_ft256 xc3s400_pq208 xc3s400_tq144 xc3s50_cp132 xc3s50_pq208 xc3s50_tq144 xc3s50_vq100 xc4vfx12_sf363 xc4vlx15_sf363 xc4vlx25_sf363 note: MicroFpga is useable on linux too, but PCCOMP and KCPSM3 are only available for windows platform - on linux the java based picoblaze assembler should be used (we have no scripts or support for that at the moment) Antti PS MicroBlaze based MicroFgpa packages are are also ready but will be released a little later.
From: Jim Granville on 19 Dec 2006 15:54 Antti Lukats wrote: > PicoBlaze C compiler has been available for some time already, > but until yesterday I never tried it. > But today when I type: > the evaluation package is ready for download <snip> > > http://www.microfpga.com/joomla/index.php?option=com_remository&Itemid=27&func=fileinfo&id=3 Interesting, but light on specifics :) Which PicoBlaze C is this using, and what other tools do the bitstream insertion ? Up to what Code size ? -jg
From: Antti Lukats on 19 Dec 2006 17:13 "Jim Granville" <no.spam(a)designtools.maps.co.nz> schrieb im Newsbeitrag news:45885149$1(a)clear.net.nz... > Antti Lukats wrote: > >> PicoBlaze C compiler has been available for some time already, >> but until yesterday I never tried it. >> But today when I type: >> the evaluation package is ready for download > <snip> >> >> http://www.microfpga.com/joomla/index.php?option=com_remository&Itemid=27&func=fileinfo&id=3 > > Interesting, but light on specifics :) > > Which PicoBlaze C is this using, and what other tools do the bitstream > insertion ? Up to what Code size ? > > -jg > Hi Jim, original PCCOMP is used to generate the object file for the KCPSM3 so pccomp generates assembly for kcpsm3.exe that emits hex or actually "MEM" directly suitable for DATA2MEM so only vendor tool used is really only data2mem - there is open-source project in progress to offer 3rd party data2mem like services so it could be that the all process to final bitstream uses no vendor supplied tools at all. ... kcpsm3 has 1k word code size this version is only 'get it going with PicoBlaze' version - the main reason why I did is was the wish to support _all_ Xilinx FPGA starting from XC2S15 in all spartan3, virtex-2/P/4/5 based systems an MicroBlaze is already useable. sorry for sparse docs - I was just little impressed to see the picoblaze c compiler to be working in action so I packaged the stuff and made available for downloads the actual documentation is being prepared as well, and will be released when microblaze based system are ready to release Antti
From: Nico Coesel on 20 Dec 2006 14:26 "Antti Lukats" <antti(a)openchip.org> wrote: >PicoBlaze C compiler has been available for some time already, >but until yesterday I never tried it. >But today when I type: > >>start build.bat > >then the following C file > >----- cut ----- >// This is first PCCOMP Program tested on MicroFpga! >// Target was S3-200 with KCPSM3_256S MF-Core > >#include "..\inc\padmap.h" >#include "..\inc\board.h" >#include "..\lib\pinapi.h" > >unsigned int i; > >// Delay >void ledelay() { for (i=0;i<65000;i++) {} } > >void main() >{ > // blink a LED forever ! > while (1) { > SetPin(LED1, 0); ledelay(); > SetPin(LED1, 1); ledelay(); > } >} What I'm really interested in is whether the assembly code generated by the compiler is well optimized or not. Can you post the generated assembly code? -- Reply to nico(a)nctdevpuntnl (punt=.) Bedrijven en winkels vindt U op www.adresboekje.nl
From: Antti on 20 Dec 2006 14:43
Nico Coesel schrieb: > "Antti Lukats" <antti(a)openchip.org> wrote: > > >PicoBlaze C compiler has been available for some time already, > >but until yesterday I never tried it. > >But today when I type: > > > What I'm really interested in is whether the assembly code generated > by the compiler is well optimized or not. Can you post the generated > assembly code? > no. the PicoBlaze C compiler is not very optimizing. so dont expect miracles. but still it was fun to see that it is useable and produces working code. if you want to test out you can download the PCCOMP from the authors site or download the MicroFpga demo package where it is included, the script there deletes all interim files, so just uncomment the call kcspm3_clean.bat and you will have the assembly file left in place i have written one REALLY optimizing risc compiler once, it was pretty hard task as I wanted the compiler to take advantage of all the resources the best way actually i have partially ported that compiler to produce picoblaze code, but that isnt finished, maybe/hopefully i have time to revise my compiler, but no promises right now Antti |