Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

synchronization or Asynchrony reading and writing SDRAM?

Status
Not open for further replies.

happsky

Advanced Member level 4
Joined
Jun 6, 2011
Messages
101
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
1,932
Code:
module WR_RD_DSP16_clk(clk,
DSP_ECLKOUT,
DSP_ED,
nWR,
nRD,
data
);
input clk;//不同时钟域的clk
input DSP_ECLKOUT;
inout [15:0] DSP_ED;
input nWR;
input nRD;
output [15:0] data;reg [15:0] data;
reg [15:0] dsp_data;
always @(posedge DSP_ECLKOUT)
 if(~nWR)
   dsp_data[15:0]<=DSP_ED[15:0];
 else
   dsp_data[15:0]<=dsp_data[15:0]; 

assign DSP_ED[15:0]=(nRD) ? 16'hzzzz:dsp_data[15:0];  

always @(posedge clk)
  data[15:0]<=dsp_data[15:0];


endmodule

where nWR and nRD is:

Code:
nWR =~(~DSP_CE& ~DSP_AWE& (DSP_EA[21:2]==20'h00000)); 
nRD =~(~DSP_CE& ~DSP_ARE&~DSP_AOE&(DSP_EA[21:2]==20'h00000));


Dear all:
This is a code read and write SDRAM,but I don't know it is synchronization or asynchrony,I think SDRAM must be synchronization ,but it's seem be asynchrony from the code.
And what the function of this sentence:
Code:
assign DSP_ED[15:0]=(nRD) ? 16'hzzzz:dsp_data[15:0];

Thank you very much!:razz:
 

This says it's syncrhonous
Code:
always @(posedge DSP_ECLKOUT)

the nWR and nRD are produced combinationally but are used synchronous to the clock.

the assign is saying output High-Z on the output pins when reading data from the SDRAM. DSP_ED is an inout.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top