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.

How to synthesize following logic into Block Ram or Lookup lables.

Status
Not open for further replies.

hallovipin

Member level 1
Joined
Dec 23, 2009
Messages
40
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,638
Hi;

consider the following code which is written to generate a histogram (channel vs count)

input peak found, write_spectrum, first_byte, reset;
input [7:0] data_in
output tx_data;
reg [15:0] spectrum [255:0];
reg [9:0] chann_cnt;

wire tx_temp_data;

reg [7:0] addr_r;

integer i;

/////////////////// Writing data //////////////////////////

always @(posedge peak_found) begin
if(reset)
for(i=0;i<256;i=i+1)
spectrum<=16'd0;
else
if(!write_spectrum)
spectrum[data_in]<=spectrum[data_in];
else
spectrum[data_in]<=spectrum[data_in]+16'd1;
end


//////////////// Reading data ////////////////

always @(posedge txclk, posedge reset)
if(reset) begin
chann_cnt<=10'd0;
first_byte<=1'b1;
end
else
if(write_spectrum)begin
chann_cnt<=10'd0;
first_byte<=1'b1;
end
else
if(chann_cnt==256)
chann_cnt<=10'd0;
else begin
if(first_byte) begin
tx_data<=tx_temp_data;
first_byte<=1'b0;
chann_cnt<=chann_cnt+8'd1;
addr_r<=chann_cnt;
end
else begin
tx_data<=tx_temp_data;
first_byte<=1'b1;
end
end

assign tx_temp_data=first_byte?spectrum[addr_r][15:8]:spectrum[addr_r][7:0];


Now the problem is that ISE (xilinx synthesis tool) is using Flip flops for generating 256*16 ([15:0] spectrum [255:0] ) buffer instead of lukup tables or available block RAm resources. This way I am exceeding the total number of available flip flop slices.
What to do.. so that I can utilize lukup tables or BLOCK RAM.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top