
per'l'over
Novice
Aug 7, 2008, 12:11 AM
Post #1 of 2
(8318 views)
|
Reading always block
|
Can't Post
|
|
I have to read always block that block appears like below <code> always @ (posedge sclk or negedge hreset_b) begin if (~hreset_b) begin wr_addr <= 7'b1111111; wr_enable <= 1'b0; end else // Data Phase of Write Cycle always @ (posedge sclk or negedge hreset_b) begin if (~hreset_b) amgctl <= 16'h00f2; else if (amgctl_wr_en) amgctl <= {8'h00, phb_hwdata[7:4], 1'b0, phb_hwdata[2:0]}; end end always @ (posedge sclk or negedge hreset_b) begin if (~hreset_b) ambcr0 <= 32'hffc2ffc2; else if (ambcr0_wr_en) ambcr0 <= phb_hwdata[31:0]; end always @ (posedge sclk or negedge hreset_b) begin if (~hreset_b) ambcr1 <= 32'hffc2ffc2; else if (ambcr1_wr_en) ambcr1 <= phb_hwdata[31:0]; end always @ (posedge sclk or negedge hreset_b) begin if (~hreset_b) begin ampctl <= 8'h0; end else if (ampctl_wr_en) begin ampctl[7:0] <= phb_hwdata[7:0]; end end </code> FOr this i got the logic to read and write always blocks into the file but its not working I attached the code to this mail.Pls look at that why it is failing to read and write always block
|