- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Respected members,
I have some doubts on Nios II processors. I am requesting the forum members to clarify my doubt. When designing NiosII processor system using SOPC builder, there is a on-chip ROM component inside the system. But the problem is that, the design is volatile, ie, when disconnecting the power, and again switching it on, again we need to program the FPGA. So my question is, what's the use of on-chip ROM. because whenever we there is a power off, data will vanish!!!. please suggest a solution for this.Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello nipu_n,
You are absolutely right that the on-chip ROM will lost the data after power-down the device. The data will be written into the ROM during config of the FPGA after power-on. So the configuration data holds the ROM data too. Bye, niosIIuser- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
> what's the use of on-chip ROM.
There's no write enable ... so it won't get corrupted by code that doesn't play nice. Basically, it's useful for code/data that must remain consistent when a device (re)configuration does not occur (e.g. software reset/watchdog reset) ... otherwise, there's little motivation to use on-chip ROM over on-chip RAM. > because whenever we there is a power off, data will vanish! Well ... this is really depends on your point-of-view I guess ... but once the Cyclone/Stratix device is configured the on-chip ROM is available ... if the device isn't configured ... then it really doesn't matter ;-) Regards, --Scott- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One other reason to select a ROM is in case you plan to move your design to Hardcopy.
Hardcopy doesn't support initialized RAMs but does support ROMs.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi nipu_n,
in case your question is more basic: Altera FPGAs are SRAM-based devices, other vendors provide FLASH-based FPGAs. So SRAM-FPGAs looses its content everytime power is removed. Everytime power is connected, the FPGA needs to be configured, that means loaded with your specific design. Because on-chip ROM is part of your design, it is initialized while configuring the device. In a stand-alone application you have to add an extra FLASH-device (e.g. serial FLASH EPCSxx) which is programmed with your design and automatically loads your FPGA after power up (in milliseconds). Mike- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you niosIIuser, smcnutt,James, and MiR for your valuable informations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i have some more doubts regarding the on-chip components in NIOSII - cyclone;
*how can i store some data into on-chip ROM? * how it is possible to count the number of LEs used by different on-chip components? am waiting for your valuable responses......- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
nipu_n,
<div class='quotetop'>QUOTE </div> --- Quote Start --- *how can i store some data into on-chip ROM?[/b] --- Quote End --- How you populate them depends on your flow. I've used both .hex and .mif formats to populate memories in Quartus II. <div class='quotetop'>QUOTE </div> --- Quote Start --- * how it is possible to count the number of LEs used by different on-chip components?[/b] --- Quote End --- Quartus II will give you both a post-synthesis and post-compilation report summarizing the resources used. This should give you what you're looking for. Cheers, - slacker- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One little detail about the on-chip ROM's:
Its read-only, yes but not when debugging inside nios ide. Somehow the nios IDE is able to load a new pattern into the ROM without reloading the FPGA sof file! Which means there is a write operation taking place. Someone could maybe explain how this is done. I can only guess.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
nipu_n,
<div class='quotetop'>QUOTE </div> --- Quote Start --- *how can i store some data into on-chip ROM?[/b] --- Quote End --- When you create your software with Nios II IDE and use somewhere in your programme that on-chip ROM, the compiler creates a 'rom-name.hex' file in your fpga directory, containing the data you've defined ( e.g. as 'const int rom_data[]' ). SOPC-Builder now adds your data to FPGA configuration data in its next compilation step. ROM, created with 'MegaWizard Plug-In Manager' can be initialized by using 'Tools->In-System Memory Content Editor' <div class='quotetop'>QUOTE </div> --- Quote Start --- * how it is possible to count the number of LEs used by different on-chip components?[/b] --- Quote End --- I don't know if there is a feature to estimate the amount of LEs, but after compiling you can see it in the hierachy window or in 'Compilation Report->Fitter->Resource Section'. The amount of LEs depends on your specific settings for the compilation process. Mike- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, most on-chip ROMs are writable when the processor is in debug mode.
To explain - when Quartus instantiates a ROM it's normally using M4K blocks but not connecting the write enable. SOPC builder ROMs have the write enable connected, but gated by a signal which the processor outputs when in debug mode. This is safe, as when the processor is in debug mode its running a debug monitor supplied by nios2-gdb-server. This monitor can be used to write code into the ROMs if you change it from within the IDE to save you from having to download a new SOF. Next time you synthesise the design Quartus will pick up the most recent output from the IDE and put that into your SOF file.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Slacker, Larsen, Mike and Wombat for your valuable suggestons.
I have a C-code for the 8051 microcontroller simulation. Whether can i implement it in NIOS II? If possible, how? Please give some valuable informations....- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I forget what 8051 code looks like, however the porting of the C code will mainly require changes to how you access peripherals, and whether or not your code was very dependent on what was previously available. So my answer is yes, but depending on the code it could be a simple or complex job. If the 8051 was memory mapped I/O (can't remember myself) then the port will not be too bad, and if this is not the case then some re-structuring may be needed (again it really depends on the code to be ported).
What does the 8051 in the system do? Also you may find that you just want to port the functionality and redo the code (might be more efficient the 2nd time around).- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you BadOmen for ur suggestion.
i haven't gone thru the code for 8051. after going thru, i'll send details thank you
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page