// Copyright 2007 Altera Corporation. All rights reserved. // Altera products are protected under numerous U.S. and foreign patents, // maskwork rights, copyrights and other intellectual property laws. // // This reference design file, and your use thereof, is subject to and governed // by the terms and conditions of the applicable Altera Reference Design // License Agreement (either as signed by you or found at www.altera.com). By // using this reference design file, you indicate your acceptance of such terms // and conditions between you and Altera Corporation. In the event that you do // not agree with such terms and conditions, you may not use the reference // design file and please promptly destroy any copies you have made. // // This reference design file is being provided on an "as-is" basis and as an // accommodation and therefore all warranties, representations or guarantees of // any kind (whether express, implied or statutory) including, without // limitation, warranties of merchantability, non-infringement, or fitness for // a particular purpose, are specifically disclaimed. By making this reference // design file available, Altera expressly does not recommend, suggest or // require that this reference design file be used in combination with any // other product not provided by Altera. ///////////////////////////////////////////////////////////////////////////// // 16 30 24 14 30 14 16 16 27 12 10 7 18 24 1 18 9 30 6 30 9 30 16 30 21 30 6 0 0 30 30 11 9 17 30 1 12 2 2 7 28 30 1 1 30 7 30 30 30 14 22 5 23 4 0 7 5 8 0 14 10 8 5 3 // 29 14 16 23 16 20 18 14 14 24 21 6 30 30 21 12 0 24 12 0 3 29 6 14 28 28 21 19 29 29 9 23 0 18 0 13 0 23 0 30 0 25 26 30 0 0 25 23 16 0 22 27 25 2 22 20 0 8 16 0 7 0 0 0 module word_stream_scramble (clk,rst,ena,din,dout,dout_valid); `include "log2.inc" parameter WORD_LEN = 32; parameter SCRAMBLE = 1'b1; // 0 for undo localparam HIST_WORDS = 31; localparam PERIOD = 64; localparam NUM_SEL = log2(HIST_WORDS-1); localparam CNTR_BITS = log2(PERIOD-1); localparam PAD_WORDS = (1<