- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I am approaching the end of my project and I think I have the last question concerning it. I have a logical circuit built in Quartus and I have a system that sends packets with payload controlled with onboard swithces (that is built on top of the NET demonstration). How can I combine that? I mean instead of sending the state of the switches, I want to be able to send the state of a signal. Let's say I have an output signal defined in a project in Quartus and I want to send the state of the signal using a C program in Nios. Can I somehow assign the signal to some address (or maybe some specific component, defined in SOPC Builder), so that I will be able to read it using a C program in Nios? Please, can anyone give me instructions on how to solve this problem? Thank you in advance. AdamLink Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The easiest way is to use a PIO peripheral in SoPC builder. Connect it to your NIOS. Then outside SoPC builder, connect the ports of the PIO to the signal you want to read. Then you can read the signal in NIOS using SoPC builder. By the way, the Simple Socket Server example does something similar except it reads rather than writes.
Jake- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot. So from what I can understand, I should add tristate bridges (PIO) or a memory to the SOPC design, then connect necessary inputs in Quartus project, and finally use the base addresses to access the components from Nios program. Is that right? If so, how to use addressing in SDRAM, for example? In fact I would prefer using PIOs, but I'm not sure how many tristate bridges (if these are the ones I should use) I can add (I have about 40 bits that I have to send over the Ethernet frame).
I hope you can also help me with that. Thank you in advance. cheers, Adam- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, maybe I should be more specific.
I really like the idea of using PIO peripherals. From what I understand I should use tir-state bridges. My problem is, however, that it is impossible to assign specific base addresses to them in SOPC (as they use Flash memory). Does anybody know how I can access them in NIOS? I would really apprieciate any help. cheers, Adam- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The PIO peripheral connects directly to the NIOS data master bus. Don't use a tristate bridge.
Jake- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Let's say I have an output signal defined in a project in Quartus and I want to send the state of the signal using a C program in Nios. Can I somehow assign the signal to some address (or maybe some specific component, defined in SOPC Builder), so that I will be able to read it using a C program in Nios? Adam --- Quote End --- Hi Adam, You can easily implement this by opting for custom component in the SOPC Builder. You can make a new component wherein you can specify the read, read enable, clock, address and data signals for this component. You need not specify any HDL model here. This creates a "component" which is just a simple interface between NIOS and the rest of the HDL design. Here, you don't need any tri-state interface either. Further, you can also have an Interrupt signal in this interface which is driven by a line that signals you that the state of the signal is up to be read. I hope that helps.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page