User defined registers with a customized memory address not updating

Applications, development tools, FPGA, C, WEB
Post Reply
Schrodinger1933
Posts: 8
Joined: Fri Mar 13, 2020 7:29 pm

User defined registers with a customized memory address not updating

Post by Schrodinger1933 » Thu Aug 20, 2020 12:10 pm

Hello all,

I am working on modifying the oscilloscope app with some extra DSP on the input. As part of the program, I need to access some variables during runtime- I have written code to do this, following Zumy Topcagic's "Start programming FPGA using Red Pitaya board" (it is the second result when searching "Start programming FPGA using Red Pitaya board" in google). I followed their example to test the procedure. The steps are provided below:
1. Define new signals ("called custom_reg_i w/ i=0,1,2,3, etc. in red_pitaya_top.sv).
2. assign the desired register (not another custom_reg_i, it is scale_factor in the pdf's example) to be equal to custom_reg_i
3. Define and add the custom_regs to be included in the instance of red_pitaya_hk "i_hk" in red_pitaya_top.sv
4. Define the registers in RedPitaya/fpga/rtl/classic/red_pitaya_hk.v as new output
5. Connect these registers to a system bus
6. Enable read/write access to these variables.

By following their example, I was able to get the behavior they described (multiplying the input on ch. 1 voltage by a user defined scaling factor, and outputting that scaled voltage on output ch. 2). However, when I tried to make it so that the custom_reg_i value was updated with the change of a user defined register (i.e. change step 2 above to be assign custom_reg_0=my_reg[31:0]; instead of the other way around), and applied the monitor command to observe the value stored at custom_reg_0's defined address, I only get zero in hexadecimal, no matter what I tried.The logic I wrote worked perfectly in simulation. If anyone has any approach to fix this or to access variables on runtime (ideally without a lot of overhead, I used the command described in the pdf partially because it was straightforward) please let me know!

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 3 guests