TARGET BeMicro: Begin specialized firmware
[yari.git] / Icarus / logshiftright.v
blobde85eb08bdcd4f356c39cfff72777e60ea2d517e
1 // -----------------------------------------------------------------------
2 //
3 // Copyright 2004 Tommy Thorn - All Rights Reserved
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 // Bostom MA 02111-1307, USA; either version 2 of the License, or
9 // (at your option) any later version; incorporated herein by reference.
11 // -----------------------------------------------------------------------
14 * Simulate a specific subset of the Altera Shift register
15 * (lpm_clshift).
17 * Not very ambitious, just the bare minimum.
20 `timescale 1ns/10ps
21 module logshiftright(distance,
22 data,
23 result);
25 parameter lpm_type = "LPM_CLSHIFT";
26 parameter lpm_width = 32;
27 parameter lpm_widthdist = 5;
29 input wire [lpm_widthdist-1:0] distance;
30 input wire [lpm_width-1 :0] data;
31 output wire [lpm_width-1 :0] result;
33 assign result = data >> distance;
34 endmodule