aboutsummaryrefslogblamecommitdiff
path: root/rtl/modexpng_core_top_debug.vh
blob: f17a875e69a2d97591181264530f809ee8b957a0 (plain) (tree)
1
2
3
4

                                                                        

                                                            










                                                                         


                                                                         














                                                                           









                                                        

















                                                                                                                                                              


              

















                                                                                                                                                              


              

















                                                                                                                                                              


              

















                                                                                                                                                              

          
//======================================================================
//
// Copyright: 2019, The Commons Conservancy Cryptech Project
// SPDX-License-Identifier: BSD-3-Clause
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// - Redistributions of source code must retain the above copyright
//   notice, this list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright
//   notice, this list of conditions and the following disclaimer in the
//   documentation and/or other materials provided with the distribution.
//
// - Neither the name of the copyright holder nor the names of its
//   contributors may be used to endorse or promote products derived from
//   this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//======================================================================

integer i;

always @(posedge clk)
    //
    if (uop_decoded_stop) begin
        //
        $display("OPCODE == STOP: BANKS DUMP FOLLOWS"); 
        //
        // X.X
        //
        $write("                  "); for (i=0; i<=word_index_last_n; i=i+1) $write("[ %3d ] ", i);                                              $write("\n");
        $write("X.X.WIDE.A:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.gen_wide[0].wide_x.mem[0*256+i]); $write("\n");
        $write("X.X.WIDE.B:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.gen_wide[0].wide_x.mem[1*256+i]); $write("\n");
        $write("X.X.WIDE.C:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.gen_wide[0].wide_x.mem[2*256+i]); $write("\n");
        $write("X.X.WIDE.D:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.gen_wide[0].wide_x.mem[3*256+i]); $write("\n");
        $write("X.X.WIDE.E:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.gen_wide[0].wide_x.mem[4*256+i]); $write("\n");
        $write("X.X.WIDE.N:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.gen_wide[0].wide_x.mem[5*256+i]); $write("\n");
        $write("X.X.WIDE.L:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.gen_wide[0].wide_x.mem[6*256+i]); $write("\n");
        $write("X.X.WIDE.H:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.gen_wide[0].wide_x.mem[7*256+i]); $write("\n");
        $write("                  "); for (i=0; i<=word_index_last_n; i=i+1) $write("------- ");                                                 $write("\n");
        $write("X.X.NARROW.A:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.narrow_x.mem[0*256+i]);           $write("\n");
        $write("X.X.NARROW.B:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.narrow_x.mem[1*256+i]);           $write("\n");
        $write("X.X.NARROW.C:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.narrow_x.mem[2*256+i]);           $write("\n");
        $write("X.X.NARROW.D:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.narrow_x.mem[3*256+i]);           $write("\n");
        $write("X.X.NARROW.E:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.narrow_x.mem[4*256+i]);           $write("\n");
        $write("X.X.NARROW.COEFF: "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.narrow_x.mem[5*256+i]);           $write("\n");
        $write("X.X.NARROW.Q:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.narrow_x.mem[6*256+i]);           $write("\n");
        $write("X.X.NARROW.EXT:   "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.narrow_x.mem[7*256+i]);           $write("\n");
        //
        // X.Y
        //
        $write("                  "); for (i=0; i<=word_index_last_n; i=i+1) $write("[ %3d ] ", i);                                              $write("\n");
        $write("X.Y.WIDE.A:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.gen_wide[0].wide_y.mem[0*256+i]); $write("\n");
        $write("X.Y.WIDE.B:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.gen_wide[0].wide_y.mem[1*256+i]); $write("\n");
        $write("X.Y.WIDE.C:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.gen_wide[0].wide_y.mem[2*256+i]); $write("\n");
        $write("X.Y.WIDE.D:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.gen_wide[0].wide_y.mem[3*256+i]); $write("\n");
        $write("X.Y.WIDE.E:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.gen_wide[0].wide_y.mem[4*256+i]); $write("\n");
        $write("X.Y.WIDE.N:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.gen_wide[0].wide_y.mem[5*256+i]); $write("\n");
        $write("X.Y.WIDE.L:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.gen_wide[0].wide_y.mem[6*256+i]); $write("\n");
        $write("X.Y.WIDE.H:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.gen_wide[0].wide_y.mem[7*256+i]); $write("\n");
        $write("                  "); for (i=0; i<=word_index_last_n; i=i+1) $write("------- ");                                                 $write("\n");
        $write("X.Y.NARROW.A:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.narrow_y.mem[0*256+i]);           $write("\n");
        $write("X.Y.NARROW.B:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.narrow_y.mem[1*256+i]);           $write("\n");
        $write("X.Y.NARROW.C:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.narrow_y.mem[2*256+i]);           $write("\n");
        $write("X.Y.NARROW.D:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.narrow_y.mem[3*256+i]);           $write("\n");
        $write("X.Y.NARROW.E:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.narrow_y.mem[4*256+i]);           $write("\n");
        $write("X.Y.NARROW.COEFF: "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.narrow_y.mem[5*256+i]);           $write("\n");
        $write("X.Y.NARROW.Q:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.narrow_y.mem[6*256+i]);           $write("\n");
        $write("X.Y.NARROW.EXT:   "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_x.narrow_y.mem[7*256+i]);           $write("\n");
        //
        // Y.X
        //
        $write("                  "); for (i=0; i<=word_index_last_n; i=i+1) $write("[ %3d ] ", i);                                              $write("\n");
        $write("Y.X.WIDE.A:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.gen_wide[0].wide_x.mem[0*256+i]); $write("\n");
        $write("Y.X.WIDE.B:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.gen_wide[0].wide_x.mem[1*256+i]); $write("\n");
        $write("Y.X.WIDE.C:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.gen_wide[0].wide_x.mem[2*256+i]); $write("\n");
        $write("Y.X.WIDE.D:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.gen_wide[0].wide_x.mem[3*256+i]); $write("\n");
        $write("Y.X.WIDE.E:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.gen_wide[0].wide_x.mem[4*256+i]); $write("\n");
        $write("Y.X.WIDE.N:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.gen_wide[0].wide_x.mem[5*256+i]); $write("\n");
        $write("Y.X.WIDE.L:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.gen_wide[0].wide_x.mem[6*256+i]); $write("\n");
        $write("Y.X.WIDE.H:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.gen_wide[0].wide_x.mem[7*256+i]); $write("\n");
        $write("                  "); for (i=0; i<=word_index_last_n; i=i+1) $write("------- ");                                                 $write("\n");
        $write("Y.X.NARROW.A:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.narrow_x.mem[0*256+i]);           $write("\n");
        $write("Y.X.NARROW.B:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.narrow_x.mem[1*256+i]);           $write("\n");
        $write("Y.X.NARROW.C:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.narrow_x.mem[2*256+i]);           $write("\n");
        $write("Y.X.NARROW.D:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.narrow_x.mem[3*256+i]);           $write("\n");
        $write("Y.X.NARROW.E:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.narrow_x.mem[4*256+i]);           $write("\n");
        $write("Y.X.NARROW.COEFF: "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.narrow_x.mem[5*256+i]);           $write("\n");
        $write("Y.X.NARROW.Q:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.narrow_x.mem[6*256+i]);           $write("\n");
        $write("Y.X.NARROW.EXT:   "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.narrow_x.mem[7*256+i]);           $write("\n");
        //
        // Y.Y
        //
        $write("                  "); for (i=0; i<=word_index_last_n; i=i+1) $write("[ %3d ] ", i);                                              $write("\n");
        $write("Y.Y.WIDE.A:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.gen_wide[0].wide_y.mem[0*256+i]); $write("\n");
        $write("Y.Y.WIDE.B:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.gen_wide[0].wide_y.mem[1*256+i]); $write("\n");
        $write("Y.Y.WIDE.C:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.gen_wide[0].wide_y.mem[2*256+i]); $write("\n");
        $write("Y.Y.WIDE.D:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.gen_wide[0].wide_y.mem[3*256+i]); $write("\n");
        $write("Y.Y.WIDE.E:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.gen_wide[0].wide_y.mem[4*256+i]); $write("\n");
        $write("Y.Y.WIDE.N:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.gen_wide[0].wide_y.mem[5*256+i]); $write("\n");
        $write("Y.Y.WIDE.L:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.gen_wide[0].wide_y.mem[6*256+i]); $write("\n");
        $write("Y.Y.WIDE.H:       "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.gen_wide[0].wide_y.mem[7*256+i]); $write("\n");
        $write("                  "); for (i=0; i<=word_index_last_n; i=i+1) $write("------- ");                                                 $write("\n");
        $write("Y.Y.NARROW.A:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.narrow_y.mem[0*256+i]);           $write("\n");
        $write("Y.Y.NARROW.B:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.narrow_y.mem[1*256+i]);           $write("\n");
        $write("Y.Y.NARROW.C:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.narrow_y.mem[2*256+i]);           $write("\n");
        $write("Y.Y.NARROW.D:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.narrow_y.mem[3*256+i]);           $write("\n");
        $write("Y.Y.NARROW.E:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.narrow_y.mem[4*256+i]);           $write("\n");
        $write("Y.Y.NARROW.COEFF: "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.narrow_y.mem[5*256+i]);           $write("\n");
        $write("Y.Y.NARROW.Q:     "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.narrow_y.mem[6*256+i]);           $write("\n");
        $write("Y.Y.NARROW.EXT:   "); for (i=0; i<=word_index_last_n; i=i+1) $write("0x%05x ", storage_block_y.narrow_y.mem[7*256+i]);           $write("\n");
        //
    end