Hello, I can download a program to memory using "nios-run my_prog.srec" and it works fine. However, when I write the program into the same memory manually (ie. memory fill command), nios will not wrong the program properly. I verified that both methods write exactly the same program bytes into memory, but nios-run does something with the memory AFTER the program end. This must be the source of my problems. Why are bytes changed after the end of the program? I verified every byte up until the last byte written as defined by the S-Record. Any ideas on what steps nios-run goes through? Help is greatly appreciated.
What does nios-run do?
Started by ●January 15, 2004
Reply by ●January 15, 20042004-01-15
What are you talking about? "cruzin" <cruiser144@hotmail.com> wrote in message news:775730eb.0401142320.250e4218@posting.google.com...> Hello, > > I can download a program to memory using "nios-run my_prog.srec" and > it works fine. > > However, when I write the program into the same memory manually (ie. > memory fill command), nios will not wrong the program properly. > > I verified that both methods write exactly the same program bytes into > memory, but nios-run does something with the memory AFTER the program > end. This must be the source of my problems. Why are bytes changed > after the end of the program? > > I verified every byte up until the last byte written as defined by the > S-Record. > > Any ideas on what steps nios-run goes through? > > Help is greatly appreciated.
Reply by ●January 16, 20042004-01-16
cruiser144@hotmail.com (cruzin) writes:> I can download a program to memory using "nios-run my_prog.srec" and > it works fine. > > However, when I write the program into the same memory manually (ie. > memory fill command), nios will not wrong the program properly.Maybe a stupid question: How do you run your manually entered program? Are you using the go (G) command in germs? Can you use go to *re-run* the downloaded srec file? Petter -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
Reply by ●January 18, 20042004-01-18
Hi Petter, I wrote a program to convert an Srec file to a binary file and then downloaded this over a PCI/Avalon bridge. I have found my problem, which was that I assumed the Srec file was always writing a contiguous memory region, when in fact sometimes addresses are skipped, presumably for alignment optimization.> cruiser144@hotmail.com (cruzin) writes: > > > I can download a program to memory using "nios-run my_prog.srec" and > > it works fine. > > > > However, when I write the program into the same memory manually (ie. > > memory fill command), nios will not wrong the program properly. > > Maybe a stupid question: How do you run your manually entered program? > Are you using the go (G) command in germs? Can you use go to *re-run* > the downloaded srec file? > > Petter
Reply by ●January 18, 20042004-01-18
cruzin <cruiser144@hotmail.com> wrote in message news:775730eb.0401172120.28d24bd6@posting.google.com...> Hi Petter, > > I wrote a program to convert an Srec file to a binary file and then > downloaded this over a PCI/Avalon bridge. > > I have found my problem, which was that I assumed the Srec file was > always writing a contiguous memory region, when in fact sometimes > addresses are skipped, presumably for alignment optimization.If you have a look at the srec spec, I'm fairly sure the first data after the 's' on every line is the address that line starts at. Nial ------------------------------------------------ Nial Stewart Developments Ltd FPGA and High Speed Digital Design Cyclone based 'Easy PCI' dev board www.nialstewartdevelopments.co.uk
Reply by ●January 18, 20042004-01-18
Hi Nial, Yes you are correct. When I wrote my Srec-converter program, I looked at a nios-built Srec file, and all records were contiguous. Later on, I realized in some programs, nios-build will skip bytes here and there. Live and learn.> cruzin <cruiser144@hotmail.com> wrote in message > news:775730eb.0401172120.28d24bd6@posting.google.com... > > Hi Petter, > > > > I wrote a program to convert an Srec file to a binary file and then > > downloaded this over a PCI/Avalon bridge. > > > > I have found my problem, which was that I assumed the Srec file was > > always writing a contiguous memory region, when in fact sometimes > > addresses are skipped, presumably for alignment optimization. > > If you have a look at the srec spec, I'm fairly sure the > first data after the 's' on every line is the address that > line starts at. > > > Nial > > ------------------------------------------------ > Nial Stewart Developments Ltd > FPGA and High Speed Digital Design > Cyclone based 'Easy PCI' dev board > www.nialstewartdevelopments.co.uk