Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Visitor
brennanwatt
Posts: 14
Registered: ‎12-03-2011
0

Reading/Writing register on Atlys Spartan 6

I am wondering how I could use VHDL to read/write to a specific register on the Atlys Spartan 6. I have been doing some searching on the web and found nothing. Any references or pointers would be appreciated. Thanks!

Expert Contributor
eteam00
Posts: 7,505
Registered: ‎07-21-2009
0

Re: Reading/Writing register on Atlys Spartan 6

[ Edited ]

I am wondering how I could use VHDL to read/write to a specific register on the Atlys Spartan 6. I have been doing some searching on the web and found nothing. Any references or pointers would be appreciated.

 

Is this "specific register" internal to the FPGA?  if so, you will need to examine and understand the source code of the design in which this register resides.  You will also need to have a working proficiency in VHDL, as you will probably be modifying the reference design source code.

 

Some FPGA development boards include a system "monitor" function for accessing internal FPGA registers from a "console window" application running on a host computer.  If such cases, you do not need to modify VHDL source code.

 

Does this make sense?

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Visitor
brennanwatt
Posts: 14
Registered: ‎12-03-2011
0

Re: Reading/Writing register on Atlys Spartan 6

I have been using FPGALink: http://www.makestuff.eu/wordpress/?page_id=1400 to have the board communicate with a PC. this software allows me to read and write registers from the command line. However, I want the Atlys to read in values from the VHDCI port, store them into an onboard register, and then read them out from the command line.
Expert Contributor
eteam00
Posts: 7,505
Registered: ‎07-21-2009
0

Re: Reading/Writing register on Atlys Spartan 6

However, I want the Atlys to read in values from the VHDCI port, store them into an onboard register, and then read them out from the command line.

 

Does this logic already exist in the FPGA design, or is this code which you need to write?

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Visitor
brennanwatt
Posts: 14
Registered: ‎12-03-2011
0

Re: Reading/Writing register on Atlys Spartan 6

I already have the ability to read/write using FPGALink. I also know how to get data from the VHDCI pins. I don't know how to write code for the FPGA (VHDL bit file) that will take a value and store it in the registers of the FPGA (so that it can be read using the FPGALink code)
Expert Contributor
joelby
Posts: 1,056
Registered: ‎10-05-2010

Re: Reading/Writing register on Atlys Spartan 6

It may be better to discuss this problem on the FPGALink mailing list, since it's not a Xilinx-specific problem.

 

Anyway, you will need to fiddle with FPGALink's TopLevel.vhdl file. Have a look at the switches and LEDs for an example of how to read and write a register. You can add additional registers by adding cases to the "case addr" statements in STATE_WRITE (which is writing from the FPGA to the PC) and STATE_READ (which is reading from the PC to the FPGA).

 

If you only had one read register and one write register and didn't care about switches and LEDs, you can just hook these up to the led_out and sw_in signals.

 

Note that because the TopLevel module is synchronous to the FX2LP's IFCLK, you will need to consider clock domain crossing issues if the rest of your design is using the system clock or something else.