electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

how to implement Look-Up table in verilog


Post new topic  Reply to topic    EDAboard.com Forum Index -> ASIC Design Methodologies & Tools (Digital) -> how to implement Look-Up table in verilog
Author Message
ravi_meghadri



Joined: 03 Aug 2007
Posts: 15


Post05 Nov 2007 14:18   

how to implement Look-Up table in verilog


Hi!

Anybody could help in writing a synthesizable verilog code for look-up table implementation. I need to design Huffman encoder with standard tables.
Back to top
FrankCh



Joined: 18 Jul 2005
Posts: 53
Helped: 6


Post05 Nov 2007 15:02   

how to implement Look-Up table in verilog


Modify this code sliplet and you have a look up table.


function [3:0] bit_sel;
input [63:0] hist;
input [3:0] idx;
reg [3:0] state;
begin
case (idx)
4'hF: bit_sel = hist[ 3:0 ];
4'hE: bit_sel = hist[ 7:4 ];
4'hD: bit_sel = hist[11:8 ];
4'hC: bit_sel = hist[15:12];
4'hB: bit_sel = hist[19:16];
4'hA: bit_sel = hist[23:20];
4'h9: bit_sel = hist[27:24];
4'h8: bit_sel = hist[31:28];
4'h7: bit_sel = hist[35:32];
4'h6: bit_sel = hist[39:36];
4'h5: bit_sel = hist[43:40];
4'h4: bit_sel = hist[47:44];
4'h3: bit_sel = hist[51:48];
4'h2: bit_sel = hist[55:52];
4'h1: bit_sel = hist[59:56];
4'h0: bit_sel = hist[63:60];
endcase
end
endfunction
Back to top
ravi_meghadri



Joined: 03 Aug 2007
Posts: 15


Post05 Nov 2007 18:54   

Re: how to implement Look-Up table in verilog


what are the various ways to initialise the look-up table?
Back to top
Google
AdSense
Google Adsense




Post05 Nov 2007 18:54   

Ads




Back to top
kelvin_sg



Joined: 17 Aug 2004
Posts: 103
Location: Singapore


Post06 Nov 2007 16:25   

Re: how to implement Look-Up table in verilog


ravi_meghadri wrote:
what are the various ways to initialise the look-up table?


Will this work?

wire [63:0] hist;
assign hist = 64'h0000_0000_0000_0000;
Back to top
firewire2035



Joined: 10 Oct 2004
Posts: 37
Helped: 1


Post07 Nov 2007 1:42   

Re: how to implement Look-Up table in verilog


kelvin_sg wrote:
ravi_meghadri wrote:
what are the various ways to initialise the look-up table?


Will this work?

wire [63:0] hist;
assign hist = 64'h0000_0000_0000_0000;


{64 {1'b0}}
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> ASIC Design Methodologies & Tools (Digital) -> how to implement Look-Up table in verilog
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
Implement look up table in Verilog in FPGA using xilinx devi (2)
how to implement look-up table in RTL? (13)
how write a Look Up Table (2)
How can I build up a look-up table for PWM or SVM? (5)
C look up table (1)
what's look-up table? (3)
look up table (LUT) (9)
hummidity look up table? (18)
Design the Look-up Table (17)
look up table in atmel 89c51 (3)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS