- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI,I want to read in port data ,but I can't read correct value :(
I use i=IORD(IN_PIO_BASE, 0); printf(" %d %d",IORD(IN_PIO_BASE, 0),i); Regardless of the input 1 or 0,it always print 1. i have no idel what wrong? anybody can help me?Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The function you are using seems to be reasonable. There are many possibilities to your problem.
Make sure: 1. The physical pin is assigned properly in your Quartus project (correct location, voltage standard). 2. The pin assignment in your top level design is connected to the proper path to your SOPC or Q-SYS instantiation. 3. The base address (IN_PIO_BASE) directly corresponds to the expected value in SOPC or Q-SYS. If you have looked at all of these and you are 100% sure they are correct, begin testing at the firmware level to make sure your pin is behaving properly. (tie it to an LED or use signaltap to monitor). Also, you can try hard-coding the input to SOPC/Q-SYS to a '1' or '0' and make sure software reads the proper value.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- The function you are using seems to be reasonable. There are many possibilities to your problem. Make sure: 1. The physical pin is assigned properly in your Quartus project (correct location, voltage standard). 2. The pin assignment in your top level design is connected to the proper path to your SOPC or Q-SYS instantiation. 3. The base address (IN_PIO_BASE) directly corresponds to the expected value in SOPC or Q-SYS. If you have looked at all of these and you are 100% sure they are correct, begin testing at the firmware level to make sure your pin is behaving properly. (tie it to an LED or use signaltap to monitor). Also, you can try hard-coding the input to SOPC/Q-SYS to a '1' or '0' and make sure software reads the proper value. --- Quote End --- I determined that the 1 and 3 are correct,but I don't understand 2 how to check.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To verify your pin is connected to the proper path to your SOPC/Q-SYS instantiation:
1. Open up your project in Quartus II. On the "Project navigator" pane, select the "Hierarchy" tab. (if you do not see the "Project Navigator" pane, there is a button in the toolbar to open it) 2. You should see a Verilog or VHDL file at the top of the tree. Double click on it. 3. Look for the pin name in the top level file. Verify that it is connected to the PIO of your SOPC/Q-SYS design.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you!
Your method is good enough, I have solved the problem. :)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page