This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cortex-M0--Simple APB peripheral Design (LED)

Hello Guys,

I connected the peripheral (LED) with cortex-M0 processor and APB BUS using CMSDK in FPGA of the spartan 6 family. I used the AHB-APB bridge to connect it to the processor. I am attaching the peripheral in the code section. I wrote startup code in assembly. The address of LED is 0x40000000. I was trying to send multiple values in peripheral using a loop.

I see the expected values in the LED in behavioral simulation in Xilinx ISE. But When I run post route simulation only the first value is sent to the LED and other values do not appear in LED. When I implemented in the FPGA I don't see multiple values assigned to the LED. Only the first value is assigned just like post route simulation. I am stuck here for almost a month but could not get to solve it. Is there any design guideline that I am missing in the peripheral that I need to follow?   

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-------------------------this is verilog file of APB-LED-----
module APB2LED(
//AHBLITE INTERFACE
//Global Signal
input wire PCLK,
input wire PRESETn,
//Slave Select Signals
input wire PSEL,
//Address, Control & Write Data
input wire PREADY,
input wire [11:0] PADDR,
input wire PWRITE,
input wire PENABLE,
input wire [31:0] PWDATA,
input wire PSLVERR,
// Transfer Response & Read Data
output wire [31:0] PRDATA,
//LED Output
output wire [7:0] PLED
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

0