UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
5,703 Views
Registered: ‎03-20-2016

How to write a number in register that present in FPGA and after writing how i can see that number is written or not?

Hello,

     How to write a number in register that present in FPGA and after writing number how i can see the that number is written or not in that register?

 

 

Thanks

Deepak

0 Kudos
8 Replies
Moderator
Moderator
5,700 Views
Registered: ‎06-24-2015

Re: How to write a number in register that present in FPGA and after writing how i can see that number is written or not?

@deepak1991,

 

You can set the INIT value for that register. Example:

set_property INIT 1'b1 [get_cells <register_name>]

For verifying, you can select the register in schematic and check the INIT value under its properties.

Thanks,
Nupur
--------------------------------------------------------------------------------------------
Google your question before posting. If someone's post answers your question, mark the post as answer with "Accept as solution". If you see a particularly good and informative post, consider giving it Kudos (click on the 'thumbs-up' button).
0 Kudos
Moderator
Moderator
5,699 Views
Registered: ‎07-01-2015

Re: How to write a number in register that present in FPGA and after writing how i can see that number is written or not?

Hi @deepak1991,

 

In the netlist you can use below Tcl command to initialize a flop.

set_property INIT 1'b1 [get_cells <name> ]

 

Similarly to get the value you can use 

get_property INIT [get_cells <name> ]

Thanks,
Arpan
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Adventurer
Adventurer
5,696 Views
Registered: ‎03-20-2016

Re: How to write a number in register that present in FPGA and after writing how i can see that number is written or not?

Hii Nupur,
You have any example for this please send it to me.I am new to fpga so i don't know how to start it.

Thanks
0 Kudos
Moderator
Moderator
5,693 Views
Registered: ‎06-24-2015

Re: How to write a number in register that present in FPGA and after writing how i can see that number is written or not?

@deepak1991

 

Open synthesized design, select a register. You can see its name in properties.

then type this in tcl console: (in my case reg name is A_reg[0].
set_property INIT 1'b1 [get_cells {A_reg[0]}]

Thanks,
Nupur
--------------------------------------------------------------------------------------------
Google your question before posting. If someone's post answers your question, mark the post as answer with "Accept as solution". If you see a particularly good and informative post, consider giving it Kudos (click on the 'thumbs-up' button).
0 Kudos
Moderator
Moderator
5,687 Views
Registered: ‎07-01-2015

Re: How to write a number in register that present in FPGA and after writing how i can see that number is written or not?

Hi @deepak1991,

 

Attached is a small testcase with a single register.

  1. Create a project
  2. Add file
  3. synthesize the design.
  4. Open synthesized design.
  5. Click on the schematic and highlight b_reg. You will INIT value in property window is 1'b0
  6. Run "set_property INIT 1'b1 [get_cells b_reg]". Note this will make INIT as 1'b1
  7. Use "get_property INIT [get_cells b_reg]". It will return 1'b1
Thanks,
Arpan
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
1.JPG
2.JPG
0 Kudos
Adventurer
Adventurer
5,682 Views
Registered: ‎03-20-2016

Re: How to write a number in register that present in FPGA and after writing how i can see that number is written or not?

Hello arpan,

    Thanks for reply.But i load this into fpga then how i can see the number?Suppose i have to write number 5 into register and have to see the 5 written correctly into that register?

 

 

Thanks

Deepak

0 Kudos
Moderator
Moderator
5,666 Views
Registered: ‎07-01-2015

Re: How to write a number in register that present in FPGA and after writing how i can see that number is written or not?

Hi @deepak1991,

 

You have to put some debug logic.

Either you can connect each bit to LED and see the pattern or you can use ILA / VIO to see the waveform or output respectively.

Thanks,
Arpan
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Adventurer
Adventurer
5,661 Views
Registered: ‎03-20-2016

Re: How to write a number in register that present in FPGA and after writing how i can see that number is written or not?

Hii arpan,
please can you send me one example that i will understand clearly.And one more if i write a data into one register and have to transfer same data into another register and see the same data is getting out how to do this any idea?

Thanks
0 Kudos