OpenCores
URL https://opencores.org/ocsvn/dblclockfft/dblclockfft/trunk

Subversion Repositories dblclockfft

[/] [dblclockfft/] [trunk/] [bench/] [cpp/] [hwbfly_tb.cpp] - Diff between revs 30 and 35

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 30 Rev 35
Line 44... Line 44...
 
 
#include "Vhwbfly.h"
#include "Vhwbfly.h"
#include "verilated.h"
#include "verilated.h"
#include "twoc.h"
#include "twoc.h"
 
 
 
#ifdef  NEW_VERILATOR
 
#define VVAR(A) hwbfly__DOT_ ## A
 
#else
 
#define VVAR(A) v__DOT_ ## A
 
#endif
 
 
 
 
class   BFLY_TB {
class   BFLY_TB {
public:
public:
        Vhwbfly         *m_bfly;
        Vhwbfly         *m_bfly;
        unsigned long   m_left[64], m_right[64];
        unsigned long   m_left[64], m_right[64];
        bool            m_aux[64];
        bool            m_aux[64];
Line 121... Line 128...
                        m_bfly->i_right,
                        m_bfly->i_right,
                        m_bfly->i_aux,
                        m_bfly->i_aux,
                        m_bfly->o_left,
                        m_bfly->o_left,
                        m_bfly->o_right,
                        m_bfly->o_right,
                        m_bfly->o_aux);
                        m_bfly->o_aux);
                /*
 
                printf("\tFI=%010lx",
 
                        ((((long)m_bfly->v__DOT__r_aux_2)&1l)<<34)
 
                        |((((long)m_bfly->v__DOT__r_sum_r)&0x01ffffl)<<17)
 
                        |(((long)m_bfly->v__DOT__r_sum_i)&0x01ffffl));
 
                printf("\tFO=%010lx SUMR=%05x SUMI=%05x A=%d",
 
                        m_bfly->v__DOT__left_saved,
 
                        m_bfly->v__DOT__r_sum_r,
 
                        m_bfly->v__DOT__r_sum_i,
 
                        m_bfly->v__DOT__r_aux_2);
 
                printf("\tDIFR=%05x DIFI=%05x ",
 
                        m_bfly->v__DOT__r_dif_r,
 
                        m_bfly->v__DOT__r_dif_i);
 
                printf("\tML=%09lx, MR=%09lx (o=%d)",
 
                        m_left[ (m_addr-4)&(64-1)],
 
                        m_right[(m_addr-4)&(64-1)], m_offset);
 
                printf("\tBLFTR=%10lx BLFTI=%10lx",
 
                        m_bfly->v__DOT__b_left_r & (~(-1l<<40)),
 
                        m_bfly->v__DOT__b_left_i & (~(-1l<<40)));
 
                printf("\tBRHTR=%10lx BRHTI=%10lx",
 
                        m_bfly->v__DOT__b_right_r & (~(-1l<<40)),
 
                        m_bfly->v__DOT__b_right_i & (~(-1l<<40)));
 
                printf("\tMPYR=%10lx MPYI=%10lx",
 
                        m_bfly->v__DOT__mpy_r & (~(-1l<<40)),
 
                        m_bfly->v__DOT__mpy_i & (~(-1l<<40)));
 
                */
 
                printf("\n");
                printf("\n");
 
 
                if ((m_syncd)&&(m_left[(m_addr-m_offset)&(64-1)] != m_bfly->o_left)) {
                if ((m_syncd)&&(m_left[(m_addr-m_offset)&(64-1)] != m_bfly->o_left)) {
                        fprintf(stderr, "WRONG O_LEFT! (%lx(exp) != %lx(sut)\n",
                        fprintf(stderr, "WRONG O_LEFT! (%lx(exp) != %lx(sut)\n",
                                m_left[(m_addr-m_offset)&(64-1)],
                                m_left[(m_addr-m_offset)&(64-1)],

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.