FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-15-2004, 08:20 AM
cruzin
Guest
 
Posts: n/a
Default What does nios-run do?

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 With Quote
  #2 (permalink)  
Old 01-15-2004, 07:25 PM
fabbl
Guest
 
Posts: n/a
Default Re: What does nios-run do?

What are you talking about?

"cruzin" <[email protected]> wrote in message
news:[email protected] om...
> 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 With Quote
  #3 (permalink)  
Old 01-16-2004, 12:37 PM
Petter Gustad
Guest
 
Posts: n/a
Default Re: What does nios-run do?

[email protected] (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 With Quote
  #4 (permalink)  
Old 01-18-2004, 06:20 AM
cruzin
Guest
 
Posts: n/a
Default Re: What does nios-run do?

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.


> [email protected] (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 With Quote
  #5 (permalink)  
Old 01-18-2004, 01:04 PM
Nial Stewart
Guest
 
Posts: n/a
Default Re: What does nios-run do?


cruzin <[email protected]> wrote in message
news:[email protected] om...
> 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 With Quote
  #6 (permalink)  
Old 01-19-2004, 12:23 AM
cruzin
Guest
 
Posts: n/a
Default Re: What does nios-run do?

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 <[email protected]> wrote in message
> news:[email protected] om...
> > 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 With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
NIOS and OCI Jerry FPGA 5 09-30-2003 03:54 AM


All times are GMT +1. The time now is 02:54 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved