-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom SoC #23
Comments
@franciscoIglesias @Mluckydwyer pls help me a bit. I am struggling a lot from the last month. |
Our demo simply allows you to view the value of a system clock, you should see it increasing as you did. Our demo documentation is written for the included zynq_demo. It does not show how to integrate your custom SoC. To do so, you would need to create a new device tree file modeling your system and then go from there. I personally do not have much experience in that scenario, but the buildroot issues are likely due to the mapping of your SoC not being correctly configured in buildroot through the device tree file. |
Thanks for replying. I did built with necessary device tree. And I checked in the runtime that that are added. But I built it with the petalinux. I am also using the zynq 702 board that I think will be the perfect thing to use that zynq_demo. Have u been able to write in that 0x40000000 address ? |
Like I wanted to know whether we can write in the address ? and read the value ? Is it possible to write and read in the same address ? |
In that demo there is no simulated memory setup, thus you cannot write to those addresses. You will need to augment the demo such as adding memory to it and map/binding QEMU to your desired range: #define NR_MASTERS 2
#define NR_DEVICES 2
SC_MODULE(Top)
{
...
memory mem;
...
Top(sc_module_name name, const char *sk_descr, sc_time quantum) :
bus("bus"),
zynq("zynq", sk_descr),
debug("debug"),
mem("mem", sc_time(1, SC_NS), 16),
rst("rst")
{
m_qk.set_global_quantum(quantum);
zynq.rst(rst);
bus.memmap(0x40000000ULL, 0x100 - 1,
ADDRMODE_RELATIVE, -1, debug.socket);
bus.memmap(0x40000100ULL, 0x10 - 1,
ADDRMODE_RELATIVE, -1, mem.socket); Something along those lines should work for you. You can then use the |
@Mluckydwyer Thanks a lot . Now it becomes more clear to me. Suppose my address of the IP block is 0x43c30000 and when I write 0x1 data in this address , my soc ip generates 32 bit number which it sent back in the address 0x43c30010 . So in this format we can't read the address right ? as it is inside the memory range (0x100 -1 )? So you suggest to change the actual custom PL address to 0x43c31000 ? some thing like so that I can read the value that is coming from the PL block ? |
can you help me to add some lines I think we need to add some lines . as I am getting segmentation fault(core dumped) error while running the app. Do we need any changes in this lines ? zynq.m_axi_gp[0]->bind(*(bus.t_sk[0]));
|
Your |
@Mluckydwyer Thanks for the point. FOR ME, NR_DEVICES 2 worked. is it right ? I have a small question. I have bind two memory address one is 0x43c3000 and 0x43c30010. In the SoC, the address 0x43c30 supposed to be returned a random number when I write 0x 1 in the address 0x43c3000. But now I am getting only 0. Do you have any suggestion where the problem would be ? I tied this two address with mem.socket for reading from custom PL block do I have to use mem socket or debug socket ? |
This was my code :
|
@Mluckydwyer I have a simple axi bus which address is 0x43c3000 and in the address 0x43c30008 it will return 0xFFFF . How to receive this value from the IP ? can u suggest anything ? |
@Mluckydwyer I have run the demo on this https://github.com/Xilinx/systemctlm-cosim-demo/blob/master/docs/zynq-7000-getting-started-guide.md and was getting some value in shell using the devmem 0x40000000. I am not sure about the result but the hex value was increasing. Can you pls help me to replace with my custom soc ? I copied the image and necessary files in buildroot/output/images folder but my devmem of custom PL blocks was not working. Whenever I tried devmem it gives text "decode error !" in the other shell.
The text was updated successfully, but these errors were encountered: