#milkymist IRC log for Tuesday, 2011-03-22

Action: xiangfu have installed the Xilinx 13.103:03
Action: xiangfu building the bitstream. seems it need some time still building03:04
xiangfukristianpaul: Hi03:04
xiangfufrom the email we need edit one line to disable the Video out. for fix the sound noise. can someone tell me which file which line I should edit. then I can build the bitstream and test in my MM1.03:18
xiangfuI have 0 experiment in VHDL :(03:18
awxiangfu, when i selected 'Webpack' items , it seems will install: Webpack, ISE, ISE DS Common, EDK, Plan Ahead Analysis Tool.06:32
xiangfuaw: I just select the 'ISE Design Suite: system edition'06:34
xiangfufrom the description: " ISE Design Suite: System Edition contains everything you need to do a complete system design."  :)06:35
xiangfu'''contains everything'''. I don't know the detail. so just just select all06:36
awfinally it asked you for a license?06:43
awxiangfu, 12.3 i installed 'Webpack' only. I remembered it needs a license.06:44
xiangfuit's will bring you to xilinx website. then you can got a license file06:46
awxiangfu, yup06:49
awxiangfu, yes, now the installer is asking me for license, so you stopped there? right?07:22
awxiangfu, i think that I am now searching my 12.3 Free ISE Webpack license first. :-)07:23
xiangfuaw: no. I have success install. just follow the link. download the xilinx.lic file :)07:23
awxiangfu, 13.1 detects my previous *.lic during last installed 12.307:37
awseems done successfully.07:38
awlekernel, xiangfu hi, i think that we are ready for studying now. :-)08:29
lekernelok, so you have the milkymist source and ise 13 installed?08:30
lekerneland sourced ise's settings32.sh?08:30
awnot yet..second08:31
xiangfulekernel: I am using a 64bit system? I sourced settings32.sh? is that a problem?08:32
lekernelI don't know08:32
xiangfuI thought it's for host system.08:32
lekernelif it doesn't work try with settings6408:33
awwhat I need to install for 'source'? i got 'sudo: source: command not found'08:34
xiangfuI have no problem with settings64. so I will just using settings64.08:34
lekernelaw: why sudo?08:34
awdon't know, i usually used 'sudo'..08:35
lekernelaw: is it ok? you have commands like impact, xst, ...?08:37
awlekernel, i can run 13.1 impact, 'xst' don't know, never run before.08:38
lekernelok, good08:39
lekernelso now go to the milkymist source08:40
lekerneland edit boards/milkymist-one/rtl/system.v08:40
awadam@adam-laptop:/opt/Xilinx/13.1/ISE_DS$ source settings32.sh08:44
aw/bin/ls: cannot access XIL_SCRIPT_LOC=/opt/Xilinx/13.1/ISE_DS: No such file or directory08:44
awis that ok? i don't know08:45
lekerneldo you have the impact command?08:45
lekerneland xst?08:45
awyes, but i could only run './impact' or '/xst' under adam@adam-laptop:/opt/Xilinx/13.1/ISE_DS/ISE/bin/lin$08:48
awthen i have them.08:48
lekernelok, use export PATH=$PATH:/opt/Xilinx/13.1/ISE_DS/ISE/bin/lin08:49
lekernelnow go to milkymist source boards/milkymist-one/synthesis08:49
lekerneland use make -f Makefile.xst08:49
lekernelnever mind the xilinx error messages, this software is full of crap, so just fix the ones that block you08:50
awcd build && xst -ifn ../system.xst08:54
aw/bin/sh: xst: not found08:54
awmake: *** [build/system.ngc] Error 12708:54
awso never mind, right?08:54
lekernelnot that one08:55
lekerneldid you run08:55
lekernelexport PATH=$PATH:/opt/Xilinx/13.1/ISE_DS/ISE/bin/lin08:55
lekernelwhich was supposed to fix that?08:55
lekernelexport PATH=$PATH:/opt/Xilinx/13.1/ISE_DS/ISE/bin/lin08:57
lekerneldoes it work now?08:59
awrunning..now .:-)09:00
lekernelok, good09:00
lekernelonce it has finished, you should have a file build/system.bit09:01
lekernelverify that you can load it with urjtag. loading it should make your board boot (it's the soc design)09:01
awphel,, xiangfu, the PATH is only worked well as the folder I faced Xiangfu told me. man. :(09:01
lekernel(use pld load)09:02
awokay. got it09:02
awafter building, i used 'pld load' to flash 'SoC' bit stream. is the work now, right?09:04
awso later you will teach us to modify 'pull down', right?09:05
lekerneldo not flash, load09:05
lekerneljust "pld load" does not modify the flash09:05
awso this 'pld load' is to 'load' system.bit into fpga, exactly right?09:07
awoah! thanks correcting me the words differently. ;-)09:09
xiangfuafter run that. there are a lot of "Minimac RX FIFO overflow!" come out in serial console.09:28
xiangfuwait. I reboot the mm1. and   pld load system.bit again. the mm1 can boot to flickernoise.09:30
awmine is creating bit map.09:30
xiangfulekernel, aw: http://pastebin.com/A69460Kt09:31
lekerneland did the board boot?09:32
lekernelsounds good...09:32
xiangfulekernel:yes. boot fine.09:32
lekernelok, now open boards/milkymist-one/rtl/system.v09:34
lekerneland as you can see you have a line "module system(" followed by the list of all signals going in and out of the fpga09:35
lekernelthis is the top level verilog file09:35
lekernelin this list you can see the vga signals are there:09:35
lekerneloutput vga_psave_n,09:35
lekerneloutput vga_hsync_n,09:35
lekerneloutput vga_vsync_n,09:35
lekerneloutput [7:0] vga_r,09:35
lekernelif you scroll down a bit you see that they go to a submodule called vga (around line 950)09:36
lekernelso what you do is 1. disconnect those signals from the vga submodule09:37
lekernelso you delete all the lines that refer to the VGA signals from the vga submodule (from ".vga_psave_n(vga_psave_n)," to ".vga_sdc(vga_sdc)")09:37
lekerneland don't forget to remove the comma at the end of ".dcb_hit(dcb_hit),"09:38
lekernel2. ground those signals09:38
lekernelfor each signal add a line09:38
lekernelassign vga_r = 0;09:38
lekernelassign vga_psave_n = 1; (to set them to VCC)09:38
lekerneldo this after the end of the vga submodule (i.e. immediately after the ");")09:39
lekernelonce you have assigned the values you want to each VGA signal (0 or 1) go to the synthesis folder again and re-run make -f Makefile.xst and use urjtag09:40
lekernelbtw if you want the FPGA not to drive a signal, use 1'bz, e.g. assign vga_sda = 1'bz;09:40
xiangfulekernel: is this correct:  http://pastebin.com/L27dRm9A09:43
lekernelyes, sounds good09:44
rohha. /me just ordered a dozend sbm-20 geiger tubes09:44
lekernelbut you should use 0 for clock, r, g, b etc.09:45
lekerneland 1 for the *_n signals09:45
awlekernel, after 'pld load' done, power cycle, should I use 'pld load' again, or it don't need since it's already existed inside fpga?09:45
lekernelaw: you don't have to power cycle, urjtag will erase the previously loaded .bit file09:45
awokay, i think i also done with verifying load .bit file. now follow them again.09:47
xiangfulekernel: like this: "http://pastebin.com/vTjC6qqS"09:48
xiangfuis those code at the right place?09:48
xiangfuI got some error: http://pastebin.com/GSXHhuuS09:49
xiangfuoh. I should using ''assign'' right?09:49
lekernelyes, assign09:50
xiangfuxiangfu: ok. after add the 'assign' compile continue now :)09:50
xiangfuPhase 9.8  Global Placement ...10:00
xiangfu14mins passed. still running:   Running physical synthesis...10:04
xiangfufinally. it's finished.10:12
xiangfuI still got the sound noise after the the serial output "RTEMS SHELL (Ver.1.0-FRC):/dev/console. Mar 14 2011. "10:13
xiangfuduring the boot. the earphone is quiet. after RTEMS SHELL show up. I got noise in my earphone.10:14
xiangfu(like an old TV without any signal)10:14
lekernelok. not very surprising i'd say, but at least you can check now10:15
xiangfuthis noise is not very obvious  with my Desktop Speaker (2.1 speaker)10:21
lekernelyup... that's what I said... sometimes it's very obvious, sometimes you barely notice it10:22
lekernelbut I don't know if this is because the noise amplitude actually varies of if it only depends on the response of speakers and environment10:22
awxiangfu, mine is still running. you needs to listenning carefully the differences before/after we load a 'pull down' on RGB wires.10:22
lekernelwe should get some scope measurements...10:22
lekernelor just measure on scope. don't listen10:23
awyes, just listening probably hard to compare..10:23
awif there's no bigger differences.10:23
xiangfucan I mute the audio in in RTEMS shell?10:24
awmeasuring on audio will be not like normal probing for scope. but I could only verify if there's obvious noise between 20Hz ~ 20Khz10:27
lekernelwhat's wrong with measuring noise on scope?10:29
awit's some sort of frequency v.s. magnitude, my scope i think probably should not distinguish them. even they are all have same magnitudes10:29
awlekernel, I'll try to compare both of them(different system.v) to probe. I am saying audio frequency response is hard to probe ..well..i'll try to measure during static state.10:31
aw'but I don't know if this is because the noise amplitude actually varies of if it only depends on the response of speakers and environment' >> agreed.10:32
awso a better measurement is good for catching.  well..so far at least thanks you taught us though on modifying 'pull high & low' tasks.10:34
awbut this is not recommended to modify if people don't know pins definitions thorough.10:36
awmy 'system.bit' is created.10:42
awyes, from my site results of only listening, they are the same loud noise. don't have clearly different though.10:47
kristianpaulah, _out_ means vga :-)10:48
kristianpaulhi xiangfu, sorry i was sleeping at that time, but seems you managed already :-)10:48
awlekernel,  i used speaker too. so yes, we _out_ & clarify that surely this is not caused by VGA RGB radiative/inductive noises influence.10:49
lekernelok, so let's not modify anything on the vga layout in rc310:49
awwell....but modification about that known issue on layout/routing is easy. you know. why not? ;-)10:50
awlekernel, one question, after 'pull down' RGB submodules, why after RTEMS run i can still see monitor? won't it be frozen on screen?11:04
lekernelthis just disconnects the FPGA I/O pins, the video controller is still running inside11:04
awhum? if they are all disconnected with FPGA I/O, why ADV7125 still have analog out to vga monitor? I still can not understand.11:08
awi was supposed that we like to 'disconnect' RGB digital/parallel signals, so there's no any analog vga encoded to RGB components to vga connector. so I was thought I should not see any in monitor.11:10
lekernelaw: ah, you mean you still have a picture?!11:11
lekernelon the screen?11:11
lekernelno, this isn't normal11:11
lekernelhow did you modify the system.v?11:11
lekerneland are you reloading correctly the new bitstream with urjtag?11:12
awthis is mine http://pastebin.com/NhA2SpjA11:15
lekernelyou've probably made a mistake somewhere. of course, this should completely prevent the monitor from displaying anything.11:15
awyes, I forgot to ask xiangfu if he see nothing on vga monitor then.11:15
lekernelset vga_clk = 011:15
lekernelnot tri-state11:15
awyeah..let me checked them again.11:16
lekernelthis doesn't explain your problem, but this signal shouldn't float anyway11:16
lekernelI guess you are sending an old system.bit to the board11:16
awbut i run 'jtag' under ':~/milkymist/boards/milkymist-one/synthesis/build$ sudo jtag', ti should not be wrong. :-)11:19
awwell..check again...:-)11:19
lekerneland you have run "make -f Makefile.xst" before, right?11:31
awand export PATH before "make..--"11:33
awphase 9.8..11:34
xiangfuaw: the VGA monitor is black. nothing on it. I saw the boot progress on serial output11:45
awxiangfu, must be mistakes on my making.11:48
awi knew it now, once successfully on 'pld load system.bit' then screen is black.11:52
awlekernel, i should carefully listen after done 'pld load system.bit' , right?11:54
awno need to power cycle or i need ?11:54
lekernelno power cycle12:00
lekernelafter pld load, your board should boot without any picture on vga12:01
lekernel(and if you measure the voltages on the adv7125 they should match the levels set in the verilog)12:01
awokay so i have the same with serial out log with 'Minimac RX FIFO overflow' msg. then monitor is black and no more loud noise.12:02
awi turned maximum on my speaker without no audio input but still plug in audio cable in. second...checking.12:04
awxiangfu, hope you confirm it again.12:06
lekernelif you get "minimac rx fifo overflow", it's a bug that prevents the board from booting12:14
lekernelyou can't draw any conclusion if you get this message. just reboot until the message goes.12:14
lekernelyou should only measure output noise when you get "RTEMS SHELL ..."12:15
awum...seems my making steps is still somethings wrong. after i power cycle and shows up "RTEMS SHELL ..." but screen is still have.12:17
awso yeah..no conclusion at all now.12:18
lekernelNEVER power cycle12:20
lekernelif you have to power cycle, you're doing it wrong12:20
awum..so my steps of making was somewhere wrong already.12:22
methril_worknice MMOne load & hack session12:22
lekernelaw: apply power, run urjtag, type "pld load", and it boots your new bitstream12:23
lekerneldon't power cycle, don't touch the buttons12:23
awumm..i was wrong on touching the buttons and power cycle though.12:28
awokay..so before/after 'pld load system.bit'...is the same.12:28
awdone. tks for teaching.12:29
lekernelit's the same?12:31
lekernelcan you ask xiangfu? he got it to work12:31
methril_workif i`ll catch it properly load is like openocd/gdb load command (it loads the "sw" into the memory, but you loose the changes if you power cycle)12:32
lekernelyeah that's what it does12:33
awlekernel, i'll confirm with xiangfu tomorrow. I got the same results.12:33
lekernelaw: but did the VGA out go off or not?12:34
awlekernel, go off surely.12:34
lekernelah, ok!12:34
lekernelwell, good, then12:34
lekerneleverything normal :)12:34
awmethril_work, i have no any idea on s/w, but today yes, thanks lekernel to let us confirm this experiments initially12:35
methril_workaw, it was a nice class ;)12:36
awdinner time here. bbl all.12:36
methril_worktoday i`ve time to test my MMOne12:36
methril_workso i learn how to load some bits12:36
methril_workthnakyou lekernel12:36
Fallenouwhat a bad name15:55
Fallenousounds like java15:55
kristianpaulah, haskell :-)16:41
Action: Fallenou is turning crazy with PIC shitty compiler and linker17:16
Fallenouhow do you tell gcc to put all the code of a .c (or each function) in a specific section ?17:16
Fallenouand then tell the linker to put this section to a specific address17:16
Fallenou-ffunction-sections section_name ?17:16
lekernelah sorry, read too fast17:17
lekernelno, this puts each function in a separate section17:17
lekernelfor the address, you must use a linker script17:17
lars_you'll have to write a linker script17:17
Fallenouin my linker script I have a section boot starting at address 0x017:17
Fallenoubut by default gcc puts the functions in the section "page"17:17
Fallenouso it's not going into my "boot" section ...17:17
Fallenoulars_: I have one17:18
Fallenouhow do I tell fuckin gcc to put the code into "boot" section17:18
Fallenouoh ! crap I put the boot section "protected"17:18
Fallenoulars_: yes and with a 500 years old gcc ?17:18
FallenouI guess there is no __attribute__ at all17:19
lars_what version of gcc are you using?17:19
Action: Fallenou checking17:19
lekernelthere's no __attribute__ at all?!17:20
Fallenouit's mcc18 actully17:20
Fallenoudon't even know if it's gcc17:20
Fallenouor just gcc based17:20
Fallenouor just not gcc at all17:20
lars_mathlab compiler?17:21
Fallenoumicrochip c compiler17:21
Fallenoufor pic1817:21
Fallenouit's clearly a shitty compiler17:21
lekernelprobably not gcc17:21
Fallenouwhen there is an error it says "syntax error line XX"17:22
Fallenounothing more17:22
lekernelsounds like the typical chipmaker software17:22
Fallenouanyway I think it's ok now17:22
FallenouI removed "protected" from the linker script section17:23
kristianpaulpic 18 gcc?17:26
kristianpaulis sdcc too bad for your app?17:27
Fallenousdcc does not work with my pic17:27
FallenouWork is in progress on supporting the Microchip PIC16 and PIC18 series <=17:28
kristianpauli had no problem with 2.3 sdcc version17:30
kristianpaulbut i guess my requirements are not so big17:30
lekernelFallenou: why don't you use an avr?17:30
kristianpaulFallenou: What you want to do with the pic18?17:31
lekernelI've had pretty much the same experience as you with PICs ...17:31
Action: kristianpaul always used PICs AVR are no wide spread in our cuntry..17:31
kristianpaulis 18F or 18C ?17:35
Fallenoulekernel: dunno, it's not my choice17:35
Fallenoukristianpaul: control a motor, doing PID, receiving orders via CAN17:36
Fallenoulekernel: pic32 is pretty nice though !17:36
Fallenoubut this time it's really gcc17:36
Fallenoudeboguing works nice too17:36
kristianpaulyeah pic32 are nice17:36
kristianpaulah, well i never worked with CAN.. :(17:41
Fallenoui'm doing a lot of can and ethercat stuff17:50
Fallenouand spi17:50
tuxbrainFallenou :(spi) then maybe I will ask you for help at one point with atmega and Nanonote :P18:33
Fallenouok, I did some spi with attiny and pic3218:35
Fallenoumaybe I could help :o18:35
methrilFallenou, i use SDCC for a lot of PIC devices at work (i motivated the change from Hi-Tech compilers to SDCC)23:23
methrilFallenou, most of them works or are easy to add support23:23
methrilmcc18 is not GCC based (AFAIK)23:24
Fallenouyes it seems so23:25
methrili used mcc18 in other works23:25
Fallenouwell in my office they used sdcc sometimes23:25
Fallenouand  to run automated tests too23:26
methrilyes, is the next step23:26
methrilfor us23:26
Fallenoubut at least during development we use the "normal" toolchain23:26
Fallenouprovided by the vendor23:26
Fallenouwith mplab, and their debuger23:26
methrilSDCC has some known bugs, but there are workarounds23:26
Fallenoucan you do debug when you use sdcc ?23:26
methrilthrough serial line & LEDs /PINs23:27
FallenouI mean single step23:27
Fallenoudumping memory23:27
Fallenouchanging PC23:27
Fallenoubreak points23:27
methrilwith a scope and some other tools is more real-time friendly23:27
FallenouI use a led and a scope too some time23:27
Fallenoubut real debugging is really usefull23:28
methrilwhen i've to debug something like limits, i use the gpsim23:28
Fallenougpsim ?23:28
methrili used to do it with ReaICE23:28
methrilgpsim is a PIC simulator23:28
Fallenouoh ok23:28
Fallenoubut you cannot simulate the environnement23:28
methrilit support some processors23:28
Fallenoulike an incomming CAN message23:28
methrilyou can not23:28
Fallenouor ADC you speak to with SPI23:28
methrilit has modules to do something like this23:29
methrilwith SPI you can23:29
FallenouI don't think you can really replace the real-time debugging23:29
methrilthere are modules that implement a SPI device23:29
Fallenounice :)23:29
methrilno, but when you have no way to debug, and you don't have the toolchain... ;)23:29
Fallenouyes sure23:29
Fallenouyou have a lot of replacement solutions23:29
methrilthe pain is getting the serial working for the first time23:30
Fallenoubut it's really hacks and workarounds23:30
Fallenoubut indeed you can get by with scope+leds+serial23:30
methrili program in Linux, but nobody hacked the Debugging23:30
methrilisee a ICD home-made and looks like it was "working" but i never tested23:31
Fallenouis it expensive the ICD 3 thing ?23:31
FallenouI use one at work23:31
Fallenou(btw scope are expensive too :p)23:31
methrilit is (ate least here)23:31
Fallenouoh ok23:32
methrilscopes are expensive, but they usually have one in electric labs :)23:32
methrili prefer PicKit2 than ICD223:32
methrili didn't check ICD323:32
Fallenoui'm using the icd323:33
methrili teste RealICE, and works ok23:33
Fallenoubecause I do pic18F *and* pic3223:33
FallenouI guess you can't do pic32 with icd223:33
Fallenou(I didn't test)23:33
Fallenousome of my colleagues use icd2 though23:33
methrili don't know23:33
methrilwe are migrating to ColdFire v!23:34
Fallenouoh freescale ?23:34
methrili had better experience with their uP23:34
Fallenounever tested23:35
FallenouI just did some avr + pic18/3223:35
methrilare like small PPCs23:35
Fallenoui'm noob :)23:35
methrili prefer other archs, let's see what lm32 gives us ;)23:36
Fallenousure !23:36
Fallenoupic18 instruction set is nice though23:36
methrilfor assembler are easy23:36
Fallenouyou can pretty much program in assembly23:36
Fallenouwithout that much pain23:36
Fallenouand translate assembly to C23:36
methrilyes, but is a mess when you deal with pointers23:37
Fallenouhum maybe yes23:37
Fallenoudidn't try23:37
methrili see a Microchip engineer doing a LLVM port for PIC18 devices23:37
methrilbut it stopped23:37
Fallenouoh :/23:37
methrilif you want to dig with compilers, you could help :)23:38
Fallenoufor the moment I don't have time for big tasks unfortunately :/23:40
methriloh!! for your problem, you could use: #pragma code func_space23:42
methriland when this functionends, #pragma code23:43
methrilto "restore" the pragma sentence23:43
methrillater on the linker, you could use the NAME=func_space23:43
Fallenouyou mean #pragma code section_name23:43
Fallenoubefore the function23:43
Fallenouthe pragma explanation in MPLAB C18 compiler user guide is hard to understand23:44
methrilsomething like this: #pragma code boot_func23:44
Fallenouthe doc is really sucky on this point23:44
methrilfvoid func (void) {23:44
methril#pragma code23:44
Fallenouhum ok23:44
methrilon the linker you put23:44
Fallenouthe thing is I need to put everything inside my c file (everything inside the project actually) inside a specific section23:44
Fallenouso I just put protected everywhere, except on this section :)23:45
Fallenouand all my functions goes into this section23:45
FallenouI needed *one* particular function to go at address 023:45
Fallenouso I put just for this one a specific pragma23:45
Fallenouwith like #pragma code func_name=0x000023:45
methrilwhen you define a code section, you could use later on (1 or more functions)23:46
methrilif you specify this in the .c file, you don need to do it into the linker, but it cleaner to have it there too23:46
Fallenouone thing I haven't sorted out yet, it how to put a function "inline"23:46
FallenouI tried several syntax without success23:47
methrilthere is no way23:47
Fallenoureally too bad23:47
FallenouIt could save me several instructions23:47
methrilat least i never had success23:47
Fallenouand I don't want to use macros23:47
methrilmaybe mixing assembler you could23:48
methrilbut i not a C18 expert23:48
Fallenouhum dunno if I can do23:48
Fallenoubra symbol_name_in_C23:48
methrilyou could23:48
methrilbra or goto (as is inline)23:48
Fallenoubut it could only work for functions without arguments23:48
Fallenoubut anyway most of my functions does not take args23:48
Fallenouit's really a "simple" code, it's a 512 bytes bootloader23:49
methrilyou could do the same that the stackdoes in assembler23:49
Fallenouhum yes but it adds too much complexity23:49
methrilit adds23:49
Fallenoudon't want to follow function call rules in assembly and stuff23:49
Fallenouif I start to do that, I should do everything in assembly23:50
FallenouI wanted to keep it simple and to stick with C23:50
methrilit's hard to maintain assembler code23:50
Fallenouto ease the maintainability of the code :)23:50
methriluse it as few as possible23:50
Fallenouactually I had already a lot of legacy working CAN code in assembly23:50
FallenouI translated it into C for my boot loader lol23:50
FallenouSo I really could have done it in assembly without too much problems23:51
Fallenoubut really C is much more readable23:51
methrilwell, bbl, i'm going to cook something23:51
Fallenou(even if I agree , on pic18 it's not that bad)23:51
Fallenoubon appetit!23:51
--- Wed Mar 23 201100:00

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