AD采集信号输入FPGA设备,FPGA设备经过处理后,传输给ARM。
(FPGA设备与ARM之间通过8跟地址线、数据线连接)
linux内核中,我分配0x20000000 - 0x40000000物理地址区间给FPGA设备。
我想问:
1、FPGA设备连接ARM后,得到的具体的物理地址(即0x20000000 - 0x40000000之间的一个值,如0x30000000),还是整个物理地址的空间(0x20000000 - 0x40000000)??
2、我要写FPGA设备的寄存器,寄存器的地址怎么得到?有多少个寄存器?能不能自己定义寄存器地址?
最后0x00000000u,u是什么意思??
谢谢大家~~~~
5 个解决方案
#1
自己顶一下
#2
0x00000000u,u is for unsigned number
As for the address space, when FPGA is connected to ARM, FPGA is supposed to respond to any r/w when the address is between 0x20000000 and 0x40000000. In other words, the FPGA's base address is 0x20000000. However, you have to ask your FPGA designer to see how many registers are defined by him, and the detailed address mapping and bit definition for each register.
For example, if your FPGA designer defined 3 registers, at 0x0000, 0x0004, 0x0008, then you should access them from ARM at 0x20000000, 0x20000004, 0x20000008
As for the address space, when FPGA is connected to ARM, FPGA is supposed to respond to any r/w when the address is between 0x20000000 and 0x40000000. In other words, the FPGA's base address is 0x20000000. However, you have to ask your FPGA designer to see how many registers are defined by him, and the detailed address mapping and bit definition for each register.
For example, if your FPGA designer defined 3 registers, at 0x0000, 0x0004, 0x0008, then you should access them from ARM at 0x20000000, 0x20000004, 0x20000008
#3
寻址时只要设备片选线选中,地址线只用到8根,真实地址才256个,地址0x20000000 - 0x40000000很多看来是重复的。寻址这些地址都是访问FPGA只是每个地址作用不一样这个可以自己定义。
一个整形常数后加u认为是unsigned类型的,
#4
+1
#5
谢谢~~
#1
自己顶一下
#2
0x00000000u,u is for unsigned number
As for the address space, when FPGA is connected to ARM, FPGA is supposed to respond to any r/w when the address is between 0x20000000 and 0x40000000. In other words, the FPGA's base address is 0x20000000. However, you have to ask your FPGA designer to see how many registers are defined by him, and the detailed address mapping and bit definition for each register.
For example, if your FPGA designer defined 3 registers, at 0x0000, 0x0004, 0x0008, then you should access them from ARM at 0x20000000, 0x20000004, 0x20000008
As for the address space, when FPGA is connected to ARM, FPGA is supposed to respond to any r/w when the address is between 0x20000000 and 0x40000000. In other words, the FPGA's base address is 0x20000000. However, you have to ask your FPGA designer to see how many registers are defined by him, and the detailed address mapping and bit definition for each register.
For example, if your FPGA designer defined 3 registers, at 0x0000, 0x0004, 0x0008, then you should access them from ARM at 0x20000000, 0x20000004, 0x20000008
#3
寻址时只要设备片选线选中,地址线只用到8根,真实地址才256个,地址0x20000000 - 0x40000000很多看来是重复的。寻址这些地址都是访问FPGA只是每个地址作用不一样这个可以自己定义。
一个整形常数后加u认为是unsigned类型的,
#4
+1
#5
谢谢~~