Forum Discussion
Altera_Forum
Honored Contributor
17 years agoChanging the Size of Data and Instruction Cache
Hello again,
I am trying to increase the data and instruction cache to test if the speed increases when reading data from the UART. At first, I tried making it four times bigger, Quartus said it couldn't fit into the device, so I eliminated the VGA and Audio modules in SOPC (I am not using them). After that I increased Instruction Cache to 8 KBytes, and Data Cache to 4 KBytes, which is the double of what I had by default. Quartus compiles the project succesfully, and everything is loaded into the FPGA. However, when I open nios2-terminal it never boots correctly, It just freezes after "Uncompressing Linux........ok, booting the kernel" And then nothing happens. I don't know if I should change something in the kernel or app config. Because I've tried so far with different combinations of Data and Instruction Cache sizes, but none of them boots correctly, except for the default values (4K Instruction and 2K data). Does the Operating System register automatically the size of the cache for both instruction and data? I haven't modified the Cache Line Size, it is still in 4 Bytes. Does it have anything to do with the Quartus License? I don't think so.. Any configuration trick on Make Menuconfig? I thought this would be a trivial modification but it turns out it isn't... perhaps I overlooked something but not sure. To be honest, I had never changed the size of these memories. Any ideas on this please? :S Regards, Francisco12 Replies
- Altera_Forum
Honored Contributor
Hello again lads,
So I started the system from scratch. I did "git clean -f -x -d" and lost all changes. First I compiled the quartus project including the larger cache memories (8Inst and 4Data), then started from make menuconfig with default options. then make vendor_hw select make romfs make nios2-configure sof nios2-download -g nois2-terminal the results, the same :( below is a message of where it stops most frequently.
Exactly the same line as before. NOw I've got to build again all the drivers. Good thing I worte them down hehe. Still haven't been able. Any ideas are welcome. Thank you all FranciscoNiosII EDS]$ nios2-terminal nios2-terminal: connected to hardware target using JTAG UART on cable nios2-terminal: "USB-Blaster ", device 1, instance 0 nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate) Uncompressing Linux... Ok, booting the kernel. Linux version 2.6.30 (pancho@holaamigos) (gcc version 3.4.6)# 5 PREEMPT Tue Jul 14 20:19:15 CDT 2009 uClinux/Nios II Built 1 zonelists in Zone order, mobility grouping off. Total pages: 2032 Kernel command line: NR_IRQS:32 PID hash table entries: 32 (order: 5, 128 bytes) Dentry cache hash table entries: 1024 (order: 0, 4096 bytes) Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) Memory available: 5352k/2556k RAM, 0k/0k ROM (1669k kernel code, 887k data) Calibrating delay loop... 46.48 BogoMIPS (lpj=232448) Mount-cache hash table entries: 512 net_namespace: 264 bytes NET: Registered protocol family 16 init_BSP(): registering device resources bio: create slab <bio-0> at 0 NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 512 (order: 0, 4096 bytes) TCP bind hash table entries: 512 (order: -1, 2048 bytes) TCP: Hash tables configured (established 512 bind 512) TCP reno registered NET: Registered protocol family 1 io scheduler noop registered io scheduler deadline registered (default) ttyJ0 at MMIO 0x19020f0 (irq = 2) is a Altera JTAG UART console enabled ttyS0 at MMIO 0x1902040 (irq = 3) is a Altera UART dm9000 Ethernet Driver, V1.31 - Altera_Forum
Honored Contributor
Hello Friends,
I have managed to run the system with the configuration I sent you. This is with 8K Instruction Cache and 2K Data Cache. This configuration is one step below what I actually need. I am trying to run the system with 16K Instruction Cache and 2K Data Cache. Do you think it is possible? I only modified this parameter in SOPC Builder for the Nios II cpu. I have already compiled the project with these characteristics and it says everything's fine. However, I am still having the same problem. The OS (uClinux) does not boot correctly. Is there a relation that must be maintained between the sizes of data and instruction cache? Is this within the DE2 Board capabilities? I have a DE2-70 Board which I could use if a bigger device is needed. Thank you FRancisco