// mnist_nn_test.c
// 2020/09/08 by marsee
//
#include <stdio.h>
#include <stdint.h>
#include "xtime_l.h"
#include "af1_weight_float.h"
#include "af1_bias_float.h"
#include "af2_weight_float.h"
#include "af2_bias_float.h"
#include "mnist_data_10.h"
#include "xmnist_nn.h"
int mnist_nn_float(float in[784], float out[10]);
int max_float(float out[10]);
int max_int32_t(int32_t out[10]);
void Xil_DCacheFlush(void);
#define NUM_ITERATIONS 10 // C Simulation
// #define NUM_ITERATIONS 2 // C/RTL CoSimulation
int main(){
float t_tran_float[NUM_ITERATIONS][784];
uint8_t t_tran_uint8_t[NUM_ITERATIONS][784];
int32_t result_hard[NUM_ITERATIONS][10];
float result_soft[NUM_ITERATIONS][10];
int max_id_hw, max_id_sw, max_id_ref;
XMnist_nn mnits_nn_ap;
int32_t res;
XTime hw_start_time, hw_end_time;
XTime sw_start_time, sw_end_time;
for(int i=0; i<NUM_ITERATIONS; i++){
for(int j=0; j<784; j++){
t_tran_float[i][j] = (float)(t_train_256[i][j])/256.0;
t_tran_uint8_t[i][j] = (uint32_t)(t_train_256[i][j]);
}
}
Xil_DCacheFlush();
// Initialize tht Device
int XMinst_status = XMnist_nn_Initialize(&mnits_nn_ap, 0);
if (XMinst_status != XST_SUCCESS){
fprintf(stderr, "Could not Initialize XMnist_nn\n");
return(-1);
}
for(int i=0; i<NUM_ITERATIONS; i++){
u32 char_num = (u32)(&t_tran_uint8_t[i][0]);
XMnist_nn_Set_in_V(&mnits_nn_ap, char_num);
XTime_GetTime(&hw_start_time);
XMnist_nn_Start(&mnits_nn_ap);
while(!XMnist_nn_IsDone(&mnits_nn_ap));
XTime_GetTime(&hw_end_time);
// minst nn result check
for(int j=0; j<5; j++){
XMnist_nn_Read_out_V_Words(&mnits_nn_ap, j, &res, 1);
result_hard[i][j*2] = res & 0x1fff; // 13 bit
if(result_hard[i][j*2] & 0x1000) // minus
result_hard[i][j*2] = 0xffffe000 | result_hard[i][j*2]; // Sign extension
result_hard[i][j*2+1] = (res & 0x1fff0000) >> 16;
if(result_hard[i][j*2+1] & 0x1000) // minus
result_hard[i][j*2+1] = 0xffffe000 | result_hard[i][j*2+1]; // Sign extension
}
XTime_GetTime(&sw_start_time);
mnist_nn_float(&t_tran_float[i][0], &result_soft[i][0]);
XTime_GetTime(&sw_end_time);
printf("i = %d, HW Execution time = %lf ms, SW Execution time = %lf ms\n", i,
(double)((long long int)hw_end_time-(long long int)hw_start_time)/333333.0,
(double)((long long int)sw_end_time-(long long int)sw_start_time)/333333.0);
}
int errflag=0;
for(int i=0; i<NUM_ITERATIONS; i++){
max_id_hw = max_int32_t(&result_hard[i][0]);
max_id_sw = max_float(&result_soft[i][0]);
max_id_ref = max_float(&t_test[i][0]);
if(max_id_ref != max_id_hw){
printf("id = %d, max_id_ref = %d, max_id_hw = %d\n", i, max_id_ref, max_id_hw);
errflag = 1;
}
if(max_id_ref != max_id_sw){
printf("id = %d, max_id_ref = %d, max_id_sw = %d\n", i, max_id_ref, max_id_sw);
errflag = 1;
}
}
if(errflag == 0)
printf("No Error\n");
return(0);
}
int mnist_nn_float(float in[784], float out[10]){
float dot1[50];
float dot2[10];
for(int col=0; col<50; col++){
dot1[col] = 0;
for(int row=0; row<784; row++){
dot1[col] += in[row]*af1_fweight[row][col];
}
dot1[col] += af1_fbias[col];
if(dot1[col] < 0) // ReLU
dot1[col] = 0;
}
for(int col=0; col<10; col++){
dot2[col] = 0;
for(int row=0; row<50; row++){
dot2[col] += dot1[row]*af2_fweight[row][col];
}
dot2[col] += af2_fbias[col];
if(dot2[col] < 0) // ReLU
dot2[col] = 0;
out[col] = dot2[col];
}
return(0);
}
int max_float(float out[10]){
int max_id;
float max;
for(int i=0; i<10; i++){
if(i == 0){
max = out[0];
max_id = 0;
}else if(out[i]>max){
max = out[i];
max_id = i;
}
}
return(max_id);
}
int max_int32_t(int32_t out[10]){
int max_id;
int32_t max;
for(int i=0; i<10; i++){
if(i == 0){
max = out[0];
max_id = 0;
}else if(out[i]>max){
max = out[i];
max_id = i;
}
}
return(max_id);
}
だけでも、float 4 バイト X 10 X 784 = 31,360 で 31k バイトも消費している。float t_tran_float[NUM_ITERATIONS][784];
を実行したときのものだ。XMnist_nn_Set_in_V(&mnits_nn_ap, char_num);
を実行したときのものだ。while(!XMnist_nn_IsDone(&mnits_nn_ap));
// mnist_nn_test.c
// 2020/09/08 by marsee
// 2020/09/24 : removed weights and biases.
//
#include <stdio.h>
#include <stdint.h>
#include "mnist_data_10.h"
#include "xmnist_nn.h"
int max_float(float out[10]);
int max_int32_t(int32_t out[10]);
#define NUM_ITERATIONS 10 // C Simulation
// #define NUM_ITERATIONS 2 // C/RTL CoSimulation
int main(){
uint8_t t_tran_uint8_t[NUM_ITERATIONS][784];
int32_t result_hard[NUM_ITERATIONS][10];
int max_id_hw, max_id_ref;
XMnist_nn mnits_nn_ap;
int32_t res;
for(int i=0; i<NUM_ITERATIONS; i++){
for(int j=0; j<784; j++){
t_tran_uint8_t[i][j] = (uint8_t)(t_train_256[i][j]);
}
}
// Initialize tht Device
int XMinst_status = XMnist_nn_Initialize(&mnits_nn_ap, 0);
if (XMinst_status != XST_SUCCESS){
fprintf(stderr, "Could not Initialize XMnist_nn\n");
return(-1);
}
for(int i=0; i<NUM_ITERATIONS; i++){
u32 char_num = (u32)(&t_tran_uint8_t[i][0]);
XMnist_nn_Set_in_V(&mnits_nn_ap, char_num);
XMnist_nn_Start(&mnits_nn_ap);
while(!XMnist_nn_IsDone(&mnits_nn_ap));
// minst nn result check
for(int j=0; j<5; j++){
XMnist_nn_Read_out_V_Words(&mnits_nn_ap, j, &res, 1);
result_hard[i][j*2] = res & 0x1fff; // 13 bit
if(result_hard[i][j*2] & 0x1000) // minus
result_hard[i][j*2] = 0xffffe000 | result_hard[i][j*2]; // Sign extension
result_hard[i][j*2+1] = (res & 0x1fff0000) >> 16;
if(result_hard[i][j*2+1] & 0x1000) // minus
result_hard[i][j*2+1] = 0xffffe000 | result_hard[i][j*2+1]; // Sign extension
}
}
int errflag=0;
for(int i=0; i<NUM_ITERATIONS; i++){
max_id_hw = max_int32_t(&result_hard[i][0]);
max_id_ref = max_float(&t_test[i][0]);
if(max_id_ref != max_id_hw){
printf("id = %d, max_id_ref = %d, max_id_hw = %d\n", i, max_id_ref, max_id_hw);
errflag = 1;
}
}
if(errflag == 0)
printf("No Error\n");
return(0);
}
int max_float(float out[10]){
int max_id;
float max;
for(int i=0; i<10; i++){
if(i == 0){
max = out[0];
max_id = 0;
}else if(out[i]>max){
max = out[i];
max_id = i;
}
}
return(max_id);
}
int max_int32_t(int32_t out[10]){
int max_id;
int32_t max;
for(int i=0; i<10; i++){
if(i == 0){
max = out[0];
max_id = 0;
}else if(out[i]>max){
max = out[i];
max_id = i;
}
}
return(max_id);
}
を実行したところ、AXI4-Lite インターフェースに Write アクセスが発生した。XMnist_nn_Set_in_V(&mnits_nn_ap, char_num);
を過ぎたときにトリガーがかかった。XDma_pow2_Set_in_r(&XDMA_pow2_ap, (u32)&data[0]);
を過ぎたときに Vivado Analyzer のトリガーがかかった。XDma_pow2_Set_out_r(&XDMA_pow2_ap, (u32)&result[0]);
// mnist_nn_test.c
// 2020/09/08 by marsee
//
#include <stdio.h>
#include <stdint.h>
#include "af1_weight_float.h"
#include "af1_bias_float.h"
#include "af2_weight_float.h"
#include "af2_bias_float.h"
#include "mnist_data_10.h"
#include "xmnist_nn.h"
int mnist_nn_float(float in[784], float out[10]);
int max_float(float out[10]);
int max_int32_t(int32_t out[10]);
#define NUM_ITERATIONS 10 // C Simulation
// #define NUM_ITERATIONS 2 // C/RTL CoSimulation
int main(){
float t_tran_float[NUM_ITERATIONS][784];
uint8_t t_tran_uint8_t[NUM_ITERATIONS][784];
int32_t result_hard[NUM_ITERATIONS][10];
float result_soft[NUM_ITERATIONS][10];
int max_id_hw, max_id_sw, max_id_ref;
XMnist_nn mnits_nn_ap;
int mnist_nn_isdone = 0;
int32_t res;
printf("Hello World\n");
for(int i=0; i<NUM_ITERATIONS; i++){
for(int j=0; j<784; j++){
t_tran_float[i][j] = (float)(t_train_256[i][j])/256.0;
t_tran_uint8_t[i][j] = (uint32_t)(t_train_256[i][j]);
}
}
// Initialize tht Device
//printf("a"); fflush(stdout);
int XMinst_status = XMnist_nn_Initialize(&mnits_nn_ap, 0);
if (XMinst_status != XST_SUCCESS){
fprintf(stderr, "Could not Initialize XMnist_nn\n");
return(-1);
}
for(int i=0; i<NUM_ITERATIONS; i++){
//printf("a"); fflush(stdout);
u32 char_num = (u32)(&t_tran_uint8_t[i][0]);
XMnist_nn_Set_in_V(&mnits_nn_ap, char_num);
//printf("a"); fflush(stdout);
XMnist_nn_Start(&mnits_nn_ap);
while(mnist_nn_isdone == 0)
mnist_nn_isdone = XMnist_nn_IsDone(&mnits_nn_ap);
// minst nn result check
for(int j=0; j<5; j++){
XMnist_nn_Read_out_V_Words(&mnits_nn_ap, i, &res, 1);
result_hard[i][j*2] = res & 0x1fff; // 13 bit
if(result_hard[i][j*2] & 0x1000) // minus
result_hard[i][j*2] = 0xffffe000 | result_hard[i][j*2]; // Sign extension
result_hard[i][j*2+1] = (res & 0x1fff0000) >> 16;
if(result_hard[i][j*2+1] & 0x1000) // minus
result_hard[i][j*2+1] = 0xffffe000 | result_hard[i][j*2+1]; // Sign extension
}
mnist_nn_float(&t_tran_float[i][0], &result_soft[i][0]);
}
int errflag=0;
for(int i=0; i<NUM_ITERATIONS; i++){
max_id_hw = max_int32_t(&result_hard[i][0]);
max_id_sw = max_float(&result_soft[i][0]);
max_id_ref = max_float(&t_test[i][0]);
if(max_id_ref != max_id_hw){
printf("id = %d, max_id_ref = %d, max_id_hw = %d\n", i, max_id_ref, max_id_hw);
errflag = 1;
}
if(max_id_ref != max_id_sw){
printf("id = %d, max_id_ref = %d, max_id_sw = %d\n", i, max_id_ref, max_id_sw);
errflag = 1;
}
}
if(errflag == 0)
printf("No Error\n");
return(0);
}
int mnist_nn_float(float in[784], float out[10]){
float dot1[50];
float dot2[10];
for(int col=0; col<50; col++){
dot1[col] = 0;
for(int row=0; row<784; row++){
dot1[col] += in[row]*af1_fweight[row][col];
}
dot1[col] += af1_fbias[col];
if(dot1[col] < 0) // ReLU
dot1[col] = 0;
}
for(int col=0; col<10; col++){
dot2[col] = 0;
for(int row=0; row<50; row++){
dot2[col] += dot1[row]*af2_fweight[row][col];
}
dot2[col] += af2_fbias[col];
if(dot2[col] < 0) // ReLU
dot2[col] = 0;
out[col] = dot2[col];
}
return(0);
}
int max_float(float out[10]){
int max_id;
float max;
for(int i=0; i<10; i++){
if(i == 0){
max = out[0];
max_id = 0;
}else if(out[i]>max){
max = out[i];
max_id = i;
}
}
return(max_id);
}
int max_int32_t(int32_t out[10]){
int max_id;
int32_t max;
for(int i=0; i<10; i++){
if(i == 0){
max = out[0];
max_id = 0;
}else if(out[i]>max){
max = out[i];
max_id = i;
}
}
return(max_id);
}
// mnist_nn.cpp
// 2017/06/01 by marsee
//
#include <stdio.h>
#include <ap_fixed.h>
#include "af1_weight.h"
#include "af1_bias.h"
#include "af2_weight.h"
#include "af2_bias.h"
int mnist_nn(ap_ufixed<8, 0, AP_TRN_ZERO, AP_SAT> in[784], ap_fixed<13, 5, AP_TRN_ZERO, AP_SAT> out[10]){
#pragma HLS DATAFLOW
#pragma HLS INTERFACE s_axilite register port=out
#pragma HLS INTERFACE m_axi depth=784 port=in offset=slave
#pragma HLS INTERFACE s_axilite port=return
ap_ufixed<8, 0, AP_TRN_ZERO, AP_SAT> buf[784];
ap_fixed<13, 5, AP_TRN_ZERO, AP_SAT> dot1[50];
ap_fixed<13, 5, AP_TRN_ZERO, AP_SAT> dot2[10];
buf_copy: for(int i=0; i<784; i++)
#pragma HLS PIPELINE II=1
buf[i] = in[i];
af1_dot1: for(int col=0; col<50; col++){
dot1[col] = 0;
af1_dot2: for(int row=0; row<784; row++){
#pragma HLS PIPELINE II=3
dot1[col] += buf[row]*af1_weight[row][col];
}
dot1[col] += af1_bias[col];
if(dot1[col] < 0) // ReLU
dot1[col] = 0;
}
af2_dot1: for(int col=0; col<10; col++){
dot2[col] = 0;
af2_dot2: for(int row=0; row<50; row++){
#pragma HLS PIPELINE II=1
dot2[col] += dot1[row]*af2_weight[row][col];
}
dot2[col] += af2_bias[col];
if(dot2[col] < 0) // ReLU
dot2[col] = 0;
out[col] = dot2[col];
}
return(0);
}
// mnist_nn_tb.cpp
// 2017/06/02 by marsee
//
#include <stdio.h>
#include <ap_fixed.h>
#include "af1_weight.h"
#include "af1_bias.h"
#include "af2_weight.h"
#include "af2_bias.h"
#include "mnist_data_10.h"
//#include "mnist_data.h"
int mnist_nn(ap_ufixed<8, 0, AP_TRN_ZERO, AP_SAT> in[784], ap_fixed<13, 5, AP_TRN_ZERO, AP_SAT> out[10]);
int mnist_nn_float(float in[784], float out[10]);
int max_ap_fixed(ap_fixed<13, 5, AP_TRN_ZERO, AP_SAT> out[10]);
int max_float(float out[10]);
#define NUM_ITERATIONS 10 // C Simulation
// #define NUM_ITERATIONS 2 // C/RTL CoSimulation
int main(){
float t_tran_float[NUM_ITERATIONS][784];
ap_fixed<13, 5, AP_TRN_ZERO, AP_SAT> result_ap_fixed[NUM_ITERATIONS][10];
float result_float[NUM_ITERATIONS][10];
int max_id_hw, max_id_sw, max_id_ref;
for(int i=0; i<NUM_ITERATIONS; i++)
for(int j=0; j<784; j++)
t_tran_float[i][j] = (float)t_train[i][j];
for(int i=0; i<NUM_ITERATIONS; i++){
mnist_nn(&t_train[i][0], &result_ap_fixed[i][0]);
mnist_nn_float(&t_tran_float[i][0], &result_float[i][0]);
}
int errflag=0;
for(int i=0; i<NUM_ITERATIONS; i++){
max_id_hw = max_ap_fixed(&result_ap_fixed[i][0]);
max_id_sw = max_float(&result_float[i][0]);
max_id_ref = max_float(&t_test[i][0]);
if(max_id_ref != max_id_hw){
printf("id = %d, max_id_ref = %d, max_id_hw = %d\n", i, max_id_ref, max_id_hw);
errflag = 1;
}
if(max_id_ref != max_id_sw){
printf("id = %d, max_id_ref = %d, max_id_sw = %d\n", i, max_id_ref, max_id_sw);
errflag = 1;
}
}
if(errflag == 0)
printf("No Error\n");
return(0);
}
int mnist_nn_float(float in[784], float out[10]){
float dot1[50];
float dot2[10];
af1_dot1: for(int col=0; col<50; col++){
dot1[col] = 0;
af1_dot2: for(int row=0; row<784; row++){
dot1[col] += in[row]*af1_fweight[row][col];
}
dot1[col] += af1_fbias[col];
if(dot1[col] < 0) // ReLU
dot1[col] = 0;
}
af2_dot1: for(int col=0; col<10; col++){
dot2[col] = 0;
af2_dot2: for(int row=0; row<50; row++){
dot2[col] += dot1[row]*af2_fweight[row][col];
}
dot2[col] += af2_fbias[col];
if(dot2[col] < 0) // ReLU
dot2[col] = 0;
out[col] = dot2[col];
}
return(0);
}
int max_ap_fixed(ap_fixed<13, 5, AP_TRN_ZERO, AP_SAT> out[10]){
int max_id;
ap_fixed<13, 5, AP_TRN_ZERO, AP_SAT> max;
for(int i=0; i<10; i++){
if(i == 0){
max = out[0];
max_id = 0;
}else if(out[i]>max){
max = out[i];
max_id = i;
}
}
return(max_id);
}
int max_float(float out[10]){
int max_id;
float max;
for(int i=0; i<10; i++){
if(i == 0){
max = out[0];
max_id = 0;
}else if(out[i]>max){
max = out[i];
max_id = i;
}
}
return(max_id);
}
Vitis HLS 2020.1
やはり、前振りが長いので、データ転送している部分を拡大する。
データ転送は 2 クロックに 1 転送になっているが、最初のレイテンシがあるようだ。
AXI4 Lite インターフェースでスタートとして、 0 番地に 1 を書いてから、転送が終了するまでは 310 ns となっている。
Vivado HLS 2020.1
Vivado HLS は、データ転送は 3 クロックに 1 転送になっている。最初のレイテンシはほぼ Vitis HLS のレイテンシと同じ時間のようだ。
AXI4 Lite インターフェースでスタートとして、 0 番地に 1 を書いてから、転送が終了するまでは 370 ns となっている。
Vitis HLS 2020.1
リソースは Vitis HLS の方が消費しているが、 CP achieved post-implementation は 5.692 ns と短い。
Vivado HLS 2020.1
リソースは Vitis HLS よりも消費していないが、CP achieved post-implementation は 8.750 ns と長い。
// pow2_axis.cpp (2018/05/16 by marsee)
#include <ap_int.h>
#include <hls_stream.h>
#include <ap_axi_sdata.h>
int pow2_axis(hls::stream<ap_axis<32,1,1,1> >& ins, hls::stream<ap_axis<32,1,1,1> >& outs){
#pragma HLS INTERFACE s_axilite port=return
#pragma HLS INTERFACE axis register both port=outs
#pragma HLS INTERFACE axis register both port=ins
ap_axis<32,1,1,1> val;
Loop1 : do { // user が 1になった時にフレームがスタートする
#pragma HLS LOOP_TRIPCOUNT min=1 max=1 avg=1
ins >> val;
} while(val.user == 0);
Loop2 : for(int i=0; i<10; i++){
if(i != 0)
ins >> val;
val.data = val.data * val.data;
outs << val;
}
return(0);
}
// pow2_axis_tb.cpp (2018/05/16 by marsee)
#include <ap_int.h>
#include <hls_stream.h>
#include <iostream>
#include <ap_axi_sdata.h>
int pow2_axis(hls::stream<ap_axis<32,1,1,1> >& ins, hls::stream<ap_axis<32,1,1,1> >& outs);
#define END_DATA_NUM 10
int main(){
using namespace std;
hls::stream<ap_axis<32,1,1,1> > ins;
hls::stream<ap_axis<32,1,1,1> > outs;
ap_axis<32,1,1,1> streamd;
ap_axis<32,1,1,1> vals;
// ins に入力データを用意する
for(int i=0; i<5; i++){ // dummy data
streamd.user = 0;
streamd.data = i;
ins << streamd;
}
for(int i=0; i<END_DATA_NUM; i++){
streamd.data = i;
if(i == 0)
streamd.user = 1;
else
streamd.user = 0;
if(i == END_DATA_NUM-1)
streamd.last = 1;
else
streamd.last = 0;
ins << streamd;
}
pow2_axis(ins, outs);
cout << endl;
cout << "outs" << endl;
for(int i=0; i<END_DATA_NUM; i++){
outs >> vals;
cout << "i = " << i << " result = " << vals.data << " vals.user = "
<< vals.user << " vals.last = " << vals.last << endl;
}
return(0);
}
Vitis HLS 2020.1
Vitis HLS は全体波形に対する有効な波形の割合が小さいので、必要な部分を拡大する。
Vivado HLS 2020.1
// DMA_pow2.cpp
// 2018/05/08 by marsee
//
int DMA_pow2(volatile int *in, volatile int *out){
#pragma HLS INTERFACE m_axi depth=10 port=out offset=slave
#pragma HLS INTERFACE m_axi depth=10 port=in offset=slave
#pragma HLS INTERFACE s_axilite port=return
for (int i=0; i<10; i++){
out[i] =in[i] * in[i];
}
return(0);
}
// DMA_pow2_tb.cpp
// 2018/05/08 by marsee
//
#include <iostream>
int DMA_pow2(volatile int *in, volatile int *out);
int main(){
int data[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
int result[10];
DMA_pow2(data, result);
for(int i=0; i<10; i++){
std::cout << "data[" << i << "]= " << data[i] <<
", result[" << i << "] = " <<
result[i] << std::endl;
}
}
Vitis 2020.1
全体の Latency が 26 クロックで 260 ns だった。速い。
VITIS_LOOP_10_1 のループの Interval が 1 で自動的にパイプラインされている。PIPELINE 指示子は付加していないが、自動的にパイプラインされてしまうようだ。ということは、2 回 in[i] を読んでいなくて、最適化もされているようだ。結構、Vivado HLS に比べて違うようだ。
Vivado HLS 2020.1
Latency は 126 クロック、 1.26 us で遅い。パイプラインもされていない。これから指示子を追加していく状態だ。
Vitis HLS 2020.1
4 個の Verilog HDL ファイルが生成さえている。
Vivado HLS 2020.1
3 個の Verilog HDL ファイルが生成されている。
Vitis HLS 2020.1
module DMA_pow2 (
ap_clk,
ap_rst_n,
m_axi_gmem_AWVALID,
m_axi_gmem_AWREADY,
m_axi_gmem_AWADDR,
m_axi_gmem_AWID,
m_axi_gmem_AWLEN,
m_axi_gmem_AWSIZE,
m_axi_gmem_AWBURST,
m_axi_gmem_AWLOCK,
m_axi_gmem_AWCACHE,
m_axi_gmem_AWPROT,
m_axi_gmem_AWQOS,
m_axi_gmem_AWREGION,
m_axi_gmem_AWUSER,
m_axi_gmem_WVALID,
m_axi_gmem_WREADY,
m_axi_gmem_WDATA,
m_axi_gmem_WSTRB,
m_axi_gmem_WLAST,
m_axi_gmem_WID,
m_axi_gmem_WUSER,
m_axi_gmem_ARVALID,
m_axi_gmem_ARREADY,
m_axi_gmem_ARADDR,
m_axi_gmem_ARID,
m_axi_gmem_ARLEN,
m_axi_gmem_ARSIZE,
m_axi_gmem_ARBURST,
m_axi_gmem_ARLOCK,
m_axi_gmem_ARCACHE,
m_axi_gmem_ARPROT,
m_axi_gmem_ARQOS,
m_axi_gmem_ARREGION,
m_axi_gmem_ARUSER,
m_axi_gmem_RVALID,
m_axi_gmem_RREADY,
m_axi_gmem_RDATA,
m_axi_gmem_RLAST,
m_axi_gmem_RID,
m_axi_gmem_RUSER,
m_axi_gmem_RRESP,
m_axi_gmem_BVALID,
m_axi_gmem_BREADY,
m_axi_gmem_BRESP,
m_axi_gmem_BID,
m_axi_gmem_BUSER,
s_axi_control_AWVALID,
s_axi_control_AWREADY,
s_axi_control_AWADDR,
s_axi_control_WVALID,
s_axi_control_WREADY,
s_axi_control_WDATA,
s_axi_control_WSTRB,
s_axi_control_ARVALID,
s_axi_control_ARREADY,
s_axi_control_ARADDR,
s_axi_control_RVALID,
s_axi_control_RREADY,
s_axi_control_RDATA,
s_axi_control_RRESP,
s_axi_control_BVALID,
s_axi_control_BREADY,
s_axi_control_BRESP,
interrupt
);
Vivado HLS 2020.1module DMA_pow2 (
ap_clk,
ap_rst_n,
m_axi_gmem_AWVALID,
m_axi_gmem_AWREADY,
m_axi_gmem_AWADDR,
m_axi_gmem_AWID,
m_axi_gmem_AWLEN,
m_axi_gmem_AWSIZE,
m_axi_gmem_AWBURST,
m_axi_gmem_AWLOCK,
m_axi_gmem_AWCACHE,
m_axi_gmem_AWPROT,
m_axi_gmem_AWQOS,
m_axi_gmem_AWREGION,
m_axi_gmem_AWUSER,
m_axi_gmem_WVALID,
m_axi_gmem_WREADY,
m_axi_gmem_WDATA,
m_axi_gmem_WSTRB,
m_axi_gmem_WLAST,
m_axi_gmem_WID,
m_axi_gmem_WUSER,
m_axi_gmem_ARVALID,
m_axi_gmem_ARREADY,
m_axi_gmem_ARADDR,
m_axi_gmem_ARID,
m_axi_gmem_ARLEN,
m_axi_gmem_ARSIZE,
m_axi_gmem_ARBURST,
m_axi_gmem_ARLOCK,
m_axi_gmem_ARCACHE,
m_axi_gmem_ARPROT,
m_axi_gmem_ARQOS,
m_axi_gmem_ARREGION,
m_axi_gmem_ARUSER,
m_axi_gmem_RVALID,
m_axi_gmem_RREADY,
m_axi_gmem_RDATA,
m_axi_gmem_RLAST,
m_axi_gmem_RID,
m_axi_gmem_RUSER,
m_axi_gmem_RRESP,
m_axi_gmem_BVALID,
m_axi_gmem_BREADY,
m_axi_gmem_BRESP,
m_axi_gmem_BID,
m_axi_gmem_BUSER,
s_axi_AXILiteS_AWVALID,
s_axi_AXILiteS_AWREADY,
s_axi_AXILiteS_AWADDR,
s_axi_AXILiteS_WVALID,
s_axi_AXILiteS_WREADY,
s_axi_AXILiteS_WDATA,
s_axi_AXILiteS_WSTRB,
s_axi_AXILiteS_ARVALID,
s_axi_AXILiteS_ARREADY,
s_axi_AXILiteS_ARADDR,
s_axi_AXILiteS_RVALID,
s_axi_AXILiteS_RREADY,
s_axi_AXILiteS_RDATA,
s_axi_AXILiteS_RRESP,
s_axi_AXILiteS_BVALID,
s_axi_AXILiteS_BREADY,
s_axi_AXILiteS_BRESP,
interrupt
);
Vitis HLS 2020.1
//------------------------Address Info-------------------
// 0x00 : Control signals
// bit 0 - ap_start (Read/Write/COH)
// bit 1 - ap_done (Read/COR)
// bit 2 - ap_idle (Read)
// bit 3 - ap_ready (Read)
// bit 7 - auto_restart (Read/Write)
// others - reserved
// 0x04 : Global Interrupt Enable Register
// bit 0 - Global Interrupt Enable (Read/Write)
// others - reserved
// 0x08 : IP Interrupt Enable Register (Read/Write)
// bit 0 - enable ap_done interrupt (Read/Write)
// bit 1 - enable ap_ready interrupt (Read/Write)
// others - reserved
// 0x0c : IP Interrupt Status Register (Read/TOW)
// bit 0 - ap_done (COR/TOW)
// bit 1 - ap_ready (COR/TOW)
// others - reserved
// 0x10 : Data signal of ap_return
// bit 31~0 - ap_return[31:0] (Read)
// 0x18 : Data signal of in_r
// bit 31~0 - in_r[31:0] (Read/Write)
// 0x1c : Data signal of in_r
// bit 31~0 - in_r[63:32] (Read/Write)
// 0x20 : reserved
// 0x24 : Data signal of out_r
// bit 31~0 - out_r[31:0] (Read/Write)
// 0x28 : Data signal of out_r
// bit 31~0 - out_r[63:32] (Read/Write)
// 0x2c : reserved
// (SC = Self Clear, COR = Clear on Read, TOW = Toggle on Write, COH = Clear on Handshake)
AXI4 Master のアドレスが 64 ビットになっているのが分かる。デフォルトで 64 ビットアドレスモードになっている。
Vivado HLS 2020.1//------------------------Address Info-------------------
// 0x00 : Control signals
// bit 0 - ap_start (Read/Write/COH)
// bit 1 - ap_done (Read/COR)
// bit 2 - ap_idle (Read)
// bit 3 - ap_ready (Read)
// bit 7 - auto_restart (Read/Write)
// others - reserved
// 0x04 : Global Interrupt Enable Register
// bit 0 - Global Interrupt Enable (Read/Write)
// others - reserved
// 0x08 : IP Interrupt Enable Register (Read/Write)
// bit 0 - Channel 0 (ap_done)
// bit 1 - Channel 1 (ap_ready)
// others - reserved
// 0x0c : IP Interrupt Status Register (Read/TOW)
// bit 0 - Channel 0 (ap_done)
// bit 1 - Channel 1 (ap_ready)
// others - reserved
// 0x10 : Data signal of ap_return
// bit 31~0 - ap_return[31:0] (Read)
// 0x18 : Data signal of in_r
// bit 31~0 - in_r[31:0] (Read/Write)
// 0x1c : reserved
// 0x20 : Data signal of out_r
// bit 31~0 - out_r[31:0] (Read/Write)
// 0x24 : reserved
// (SC = Self Clear, COR = Clear on Read, TOW = Toggle on Write, COH = Clear on Handshake)
AXI4 Master のアドレスは通常の 32 ビットモードになっている。
// multi_test.c
// 2015/07/24 : by marsee
// multi_in0 の入力の時に999を入力すると終了する
// 2020/09/11 : Vitis HLS 2020.1 の IP 用にドライバの関数名を変更
#include <stdio.h>
#include "xmulti_apuint.h"
#include "xparameters.h"
int main(){
XMulti_apuint XMluti_ap;
XMulti_apuint_Config *XMulti_apPtr;
int val;
// Look Up the device configuration
XMulti_apPtr = XMulti_apuint_LookupConfig(0);
if (!XMulti_apPtr){
fprintf(stderr, "XMulti_apuint configuration failed.\n");
return(-1);
}
// Initialize the Device
int Xlap_status = XMulti_apuint_CfgInitialize(&XMluti_ap, XMulti_apPtr);
if (Xlap_status != XST_SUCCESS){
fprintf(stderr, "Could not Initialize XMulti_apuint\n");
return(-1);
}
while(1){
printf("\n\rmulti_in0 = ");
scanf("%d", &val);
if(val == 999)
break;
XMulti_apuint_Set_multi_in0(&XMluti_ap, val);
printf("\n\rmulti_in1 = ");
scanf("%d", &val);
XMulti_apuint_Set_multi_in1(&XMluti_ap, val);
while(!XMulti_apuint_IsIdle(&XMluti_ap)) ;
XMulti_apuint_Start(&XMluti_ap);
while(!XMulti_apuint_IsDone(&XMluti_ap)) ;
printf("\n\rmulti_out = %d\n\r", (int)XMulti_apuint_Get_multi_out_o(&XMluti_ap));
}
return(0);
}
// multi_apuint.cpp
#include <ap_int.h>
void multi_apuint(ap_uint<8> multi_in0, ap_uint<8> multi_in1,
ap_uint<16> *multi_out){
#pragma HLS INTERFACE s_axilite port=multi_out
#pragma HLS INTERFACE s_axilite port=multi_in1
#pragma HLS INTERFACE s_axilite port=multi_in0
#pragma HLS INTERFACE s_axilite port=return
*multi_out = multi_in0 * multi_in1;
}
Vitis HLS 2020.1
multi_apuint.v, multi_apuint_control_s_axi.v, multi_apuint_mul_8ns_8ns_16_1_1.v の 3 このファイルが合成されている。
AXI4 Lite インターフェースの信号名に s_axi_control_ が付けられている。
Vivado HLS 2020.1
multi_apuint.v, multi_apuint_AXILiteS_s_axi.v の 2 このファイルが合成されている。
AXI4 Lite インターフェースの信号名に s_axi_AXILiteS_ が付けられている。
Vitis HLS 2020.1
//------------------------Address Info-------------------
// 0x00 : Control signals
// bit 0 - ap_start (Read/Write/SC)
// bit 1 - ap_done (Read/COR)
// bit 2 - ap_idle (Read)
// bit 3 - ap_ready (Read)
// bit 7 - auto_restart (Read/Write)
// others - reserved
// 0x04 : Global Interrupt Enable Register
// bit 0 - Global Interrupt Enable (Read/Write)
// others - reserved
// 0x08 : IP Interrupt Enable Register (Read/Write)
// bit 0 - enable ap_done interrupt (Read/Write)
// others - reserved
// 0x0c : IP Interrupt Status Register (Read/TOW)
// bit 0 - ap_done (COR/TOW)
// others - reserved
// 0x10 : Data signal of multi_in0
// bit 31~0 - multi_in0[31:0] (Read/Write)
// 0x14 : reserved
// 0x18 : Data signal of multi_in1
// bit 31~0 - multi_in1[31:0] (Read/Write)
// 0x1c : reserved
// 0x20 : Data signal of multi_out_i
// bit 31~0 - multi_out_i[31:0] (Read/Write)
// 0x24 : reserved
// 0x28 : Data signal of multi_out_o
// bit 31~0 - multi_out_o[31:0] (Read)
// 0x2c : Control signal of multi_out_o
// bit 0 - multi_out_o_ap_vld (Read/COR)
// others - reserved
// (SC = Self Clear, COR = Clear on Read, TOW = Toggle on Write, COH = Clear on Handshake)
Vivado HLS 2020.1/------------------------Address Info-------------------
// 0x00 : Control signals
// bit 0 - ap_start (Read/Write/SC)
// bit 1 - ap_done (Read/COR)
// bit 2 - ap_idle (Read)
// bit 3 - ap_ready (Read)
// bit 7 - auto_restart (Read/Write)
// others - reserved
// 0x04 : Global Interrupt Enable Register
// bit 0 - Global Interrupt Enable (Read/Write)
// others - reserved
// 0x08 : IP Interrupt Enable Register (Read/Write)
// bit 0 - Channel 0 (ap_done)
// others - reserved
// 0x0c : IP Interrupt Status Register (Read/TOW)
// bit 0 - Channel 0 (ap_done)
// others - reserved
// 0x10 : Data signal of multi_in0_V
// bit 7~0 - multi_in0_V[7:0] (Read/Write)
// others - reserved
// 0x14 : reserved
// 0x18 : Data signal of multi_in1_V
// bit 7~0 - multi_in1_V[7:0] (Read/Write)
// others - reserved
// 0x1c : reserved
// 0x20 : Data signal of multi_out_V
// bit 15~0 - multi_out_V[15:0] (Read)
// others - reserved
// 0x24 : Control signal of multi_out_V
// bit 0 - multi_out_V_ap_vld (Read/COR)
// others - reserved
// (SC = Self Clear, COR = Clear on Read, TOW = Toggle on Write, COH = Clear on Handshake
Vitis HLS 2020.1
DSP が 1 個だけなのはなぜだろうか?
Vivado HLS 2020.1
やはり DSP が 1 個だけだ。
// multi_apuint.cpp
#include <ap_int.h>
void multi_apuint(ap_uint<8> multi_in0, ap_uint<8> multi_in1,
ap_uint<16> *multi_out){
#pragma HLS PIPELINE
#pragma HLS INTERFACE ap_hs register port=multi_out
#pragma HLS INTERFACE ap_hs register port=multi_in1
#pragma HLS INTERFACE ap_hs register port=multi_in0
*multi_out = multi_in0 * multi_in1;
}
Starting C/RTL cosimulation ...
/media/masaaki/Ubuntu_Disk/tools/Xilinx/Vitis/2020.1/bin/vitis_hls /media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/cosim.tcl
INFO: [HLS 200-10] Running '/media/masaaki/Ubuntu_Disk/tools/Xilinx/Vitis/2020.1/bin/unwrapped/lnx64.o/vitis_hls'
INFO: [HLS 200-10] For user 'masaaki' on host 'masaaki-H110M4-M01' (Linux_x86_64 version 4.15.0-115-generic) on Wed Sep 09 20:41:00 JST 2020
INFO: [HLS 200-10] On os Ubuntu 18.04.5 LTS
INFO: [HLS 200-10] In directory '/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar'
WARNING: [HLS 200-40] Environment variable 'C_INCLUDE_PATH' is set to :/usr/local/cuda/include.
Sourcing Tcl script '/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/cosim.tcl'
INFO: [HLS 200-10] Opening project '/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint'.
INFO: [HLS 200-10] Adding design file 'multi_apuint/multi_apuint.cpp' to the project
INFO: [HLS 200-10] Adding test bench file 'multi_apuint/multi_apuint_tb.cpp' to the project
INFO: [HLS 200-10] Opening solution '/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1'.
INFO: [SYN 201-201] Setting up clock 'default' with a period of 10ns.
INFO: [HLS 200-10] Setting target device to 'xc7z020-clg400-1'
INFO: [HLS 200-1505] Using flow_target 'vivado'
Resolution: For help on HLS 200-1505 see www.xilinx.com/html_docs/xilinx2020_1/hls-guidance/200-1505.html
INFO: [HLS 200-1464] Running solution command: config_export -format=ip_catalog
INFO: [HLS 200-1464] Running solution command: config_export -rtl=verilog
INFO: [SYN 201-201] Setting up clock 'default' with a period of 10ns.
INFO: [COSIM 212-47] Using XSIM for RTL simulation.
INFO: [COSIM 212-14] Instrumenting C test bench ...
Build using "/media/masaaki/Ubuntu_Disk/tools/Xilinx/Vivado/2020.1/tps/lnx64/gcc-6.2.0/bin/g++"
Compiling multi_apuint_tb.cpp_pre.cpp.tb.cpp
Compiling apatb_multi_apuint.cpp
Compiling multi_apuint.cpp_pre.cpp.tb.cpp
Generating cosim.tv.exe
INFO: [COSIM 212-302] Starting C TB testing ...
multi_out = 0
multi_out = 2
multi_out = 6
multi_out = 12
multi_out = 20
multi_out = 30
multi_out = 42
multi_out = 56
multi_out = 72
multi_out = 90
INFO: [COSIM 212-333] Generating C post check test bench ...
INFO: [COSIM 212-12] Generating RTL test bench ...
INFO: [COSIM 212-1] *** C/RTL co-simulation file generation completed. ***
INFO: [COSIM 212-323] Starting verilog simulation.
INFO: [COSIM 212-15] Starting XSIM ...
Vivado Simulator 2020.1
Copyright 1986-1999, 2001-2020 Xilinx, Inc. All Rights Reserved.
Running: /media/masaaki/Ubuntu_Disk/tools/Xilinx/Vivado/2020.1/patches/AR75369_vivado_2020_1_preliminary_rev1/vivado/bin/unwrapped/lnx64.o/xelab xil_defaultlib.apatb_multi_apuint_top glbl -prj multi_apuint.prj -L smartconnect_v1_0 -L axi_protocol_checker_v1_1_12 -L axi_protocol_checker_v1_1_13 -L axis_protocol_checker_v1_1_11 -L axis_protocol_checker_v1_1_12 -L xil_defaultlib -L unisims_ver -L xpm --lib ieee_proposed=./ieee_proposed -s multi_apuint -debug wave
Multi-threading is on. Using 2 slave threads.
WARNING: [XSIM 43-3431] One or more environment variables have been detected which affect the operation of the C compiler. These are typically not set in standard installations and are not tested by Xilinx, however they may be appropriate for your system, so the flow will attempt to continue. If errors occur, try running xelab with the "-mt off -v 1" switches to see more information from the C compiler. The following environment variables have been detected:
C_INCLUDE_PATH
LIBRARY_PATH
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/glbl.v" into library work
INFO: [VRFC 10-311] analyzing module glbl
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/multi_apuint.autotb.v" into library xil_defaultlib
INFO: [VRFC 10-311] analyzing module apatb_multi_apuint_top
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/multi_apuint.v" into library xil_defaultlib
INFO: [VRFC 10-311] analyzing module multi_apuint
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/multi_apuint_mul_8ns_8ns_16_1_1.v" into library xil_defaultlib
INFO: [VRFC 10-311] analyzing module multi_apuint_mul_8ns_8ns_16_1_1_Multiplier_0
INFO: [VRFC 10-311] analyzing module multi_apuint_mul_8ns_8ns_16_1_1
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/regslice_core.v" into library xil_defaultlib
INFO: [VRFC 10-311] analyzing module regslice_both
INFO: [VRFC 10-311] analyzing module regslice_forward
INFO: [VRFC 10-311] analyzing module regslice_reverse
INFO: [VRFC 10-311] analyzing module regslice_both_w1
INFO: [VRFC 10-311] analyzing module regslice_forward_w1
INFO: [VRFC 10-311] analyzing module regslice_reverse_w1
INFO: [VRFC 10-311] analyzing module ibuf
INFO: [VRFC 10-311] analyzing module obuf
Starting static elaboration
Pass Through NonSizing Optimizer
Completed static elaboration
Starting simulation data flow analysis
Completed simulation data flow analysis
Time Resolution for simulation is 1ps
Compiling module xil_defaultlib.multi_apuint_mul_8ns_8ns_16_1_1_...
Compiling module xil_defaultlib.multi_apuint_mul_8ns_8ns_16_1_1(...
Compiling module xil_defaultlib.obuf(W=9)
Compiling module xil_defaultlib.regslice_forward(DataWidth=8)
Compiling module xil_defaultlib.obuf(W=17)
Compiling module xil_defaultlib.regslice_forward(DataWidth=16)
Compiling module xil_defaultlib.multi_apuint
Compiling module xil_defaultlib.apatb_multi_apuint_top
Compiling module work.glbl
Built simulation snapshot multi_apuint
****** Webtalk v2020.1_AR75369 (64-bit)
**** SW Build 2902540 on Wed May 27 19:54:35 MDT 2020
**** IP Build 2902112 on Wed May 27 22:43:36 MDT 2020
** Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
source /media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/xsim.dir/multi_apuint/webtalk/xsim_webtalk.tcl -notrace
INFO: [Common 17-206] Exiting Webtalk at Wed Sep 9 20:41:13 2020...
****** xsim v2020.1_AR75369 (64-bit)
**** SW Build 2902540 on Wed May 27 19:54:35 MDT 2020
**** IP Build 2902112 on Wed May 27 22:43:36 MDT 2020
** Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
source xsim.dir/multi_apuint/xsim_script.tcl
# xsim {multi_apuint} -autoloadwcfg -tclbatch {multi_apuint.tcl}
Vivado Simulator 2020.1
Time resolution is 1 ps
source multi_apuint.tcl
## log_wave -r /
WARNING: [Simtcl 6-197] One or more HDL objects could not be logged because of object type or size limitations. To see details please rerun the command with -verbose (-v).
## set designtopgroup [add_wave_group "Design Top Signals"]
## set coutputgroup [add_wave_group "C Outputs" -into $designtopgroup]
## set multi_out_group [add_wave_group multi_out(wire) -into $coutputgroup]
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_out_ap_vld -into $multi_out_group -color #ffff00 -radix hex
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_out -into $multi_out_group -radix hex
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_out_ap_ack -into $multi_out_group -color #ffff00 -radix hex
## set cinputgroup [add_wave_group "C Inputs" -into $designtopgroup]
## set multi_in0_group [add_wave_group multi_in0(wire) -into $cinputgroup]
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_in0_ap_ack -into $multi_in0_group -color #ffff00 -radix hex
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_in0 -into $multi_in0_group -radix hex
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_in0_ap_vld -into $multi_in0_group -color #ffff00 -radix hex
## set multi_in1_group [add_wave_group multi_in1(wire) -into $cinputgroup]
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_in1_ap_ack -into $multi_in1_group -color #ffff00 -radix hex
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_in1 -into $multi_in1_group -radix hex
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_in1_ap_vld -into $multi_in1_group -color #ffff00 -radix hex
## set blocksiggroup [add_wave_group "Block-level IO Handshake" -into $designtopgroup]
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/ap_start -into $blocksiggroup
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/ap_done -into $blocksiggroup
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/ap_idle -into $blocksiggroup
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/ap_ready -into $blocksiggroup
## set resetgroup [add_wave_group "Reset" -into $designtopgroup]
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/ap_rst -into $resetgroup
## set clockgroup [add_wave_group "Clock" -into $designtopgroup]
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/ap_clk -into $clockgroup
## set testbenchgroup [add_wave_group "Test Bench Signals"]
## set tbinternalsiggroup [add_wave_group "Internal Signals" -into $testbenchgroup]
## set tb_simstatus_group [add_wave_group "Simulation Status" -into $tbinternalsiggroup]
## set tb_portdepth_group [add_wave_group "Port Depth" -into $tbinternalsiggroup]
## add_wave /apatb_multi_apuint_top/AUTOTB_TRANSACTION_NUM -into $tb_simstatus_group -radix hex
## add_wave /apatb_multi_apuint_top/ready_cnt -into $tb_simstatus_group -radix hex
## add_wave /apatb_multi_apuint_top/done_cnt -into $tb_simstatus_group -radix hex
## add_wave /apatb_multi_apuint_top/LENGTH_multi_in0 -into $tb_portdepth_group -radix hex
## add_wave /apatb_multi_apuint_top/LENGTH_multi_in1 -into $tb_portdepth_group -radix hex
## add_wave /apatb_multi_apuint_top/LENGTH_multi_out -into $tb_portdepth_group -radix hex
## set tbcoutputgroup [add_wave_group "C Outputs" -into $testbenchgroup]
## set tb_multi_out_group [add_wave_group multi_out(wire) -into $tbcoutputgroup]
## add_wave /apatb_multi_apuint_top/multi_out_ap_vld -into $tb_multi_out_group -color #ffff00 -radix hex
## add_wave /apatb_multi_apuint_top/multi_out -into $tb_multi_out_group -radix hex
## add_wave /apatb_multi_apuint_top/multi_out_ap_ack -into $tb_multi_out_group -color #ffff00 -radix hex
## set tbcinputgroup [add_wave_group "C Inputs" -into $testbenchgroup]
## set tb_multi_in0_group [add_wave_group multi_in0(wire) -into $tbcinputgroup]
## add_wave /apatb_multi_apuint_top/multi_in0_ap_ack -into $tb_multi_in0_group -color #ffff00 -radix hex
## add_wave /apatb_multi_apuint_top/multi_in0 -into $tb_multi_in0_group -radix hex
## add_wave /apatb_multi_apuint_top/multi_in0_ap_vld -into $tb_multi_in0_group -color #ffff00 -radix hex
## set tb_multi_in1_group [add_wave_group multi_in1(wire) -into $tbcinputgroup]
## add_wave /apatb_multi_apuint_top/multi_in1_ap_ack -into $tb_multi_in1_group -color #ffff00 -radix hex
## add_wave /apatb_multi_apuint_top/multi_in1 -into $tb_multi_in1_group -radix hex
## add_wave /apatb_multi_apuint_top/multi_in1_ap_vld -into $tb_multi_in1_group -color #ffff00 -radix hex
## save_wave_config multi_apuint.wcfg
## run all
////////////////////////////////////////////////////////////////////////////////////
// Inter-Transaction Progress: Completed Transaction / Total Transaction
// Intra-Transaction Progress: Measured Latency / Latency Estimation * 100%
//
// RTL Simulation : "Inter-Transaction Progress" ["Intra-Transaction Progress"] @ "Simulation Time"
////////////////////////////////////////////////////////////////////////////////////
// RTL Simulation : 0 / 10 [0.00%] @ "1125000"
// RTL Simulation : 1 / 10 [50.00%] @ "1165000"
// RTL Simulation : 2 / 10 [50.00%] @ "1175000"
// RTL Simulation : 3 / 10 [50.00%] @ "1185000"
// RTL Simulation : 4 / 10 [50.00%] @ "1195000"
// RTL Simulation : 5 / 10 [50.00%] @ "1205000"
// RTL Simulation : 6 / 10 [50.00%] @ "1215000"
// RTL Simulation : 7 / 10 [50.00%] @ "1225000"
// RTL Simulation : 8 / 10 [50.00%] @ "1235000"
// RTL Simulation : 9 / 10 [50.00%] @ "1245000"
// RTL Simulation : 10 / 10 [100.00%] @ "1255000"
////////////////////////////////////////////////////////////////////////////////////
$finish called at time : 1295 ns : File "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/multi_apuint.autotb.v" Line 382
## quit
INFO: [Common 17-206] Exiting xsim at Wed Sep 9 20:41:23 2020...
INFO: [COSIM 212-316] Starting C post checking ...
multi_out = 0
multi_out = 2
multi_out = 6
multi_out = 12
multi_out = 20
multi_out = 30
multi_out = 42
multi_out = 56
multi_out = 72
multi_out = 90
INFO: [COSIM 212-1000] *** C/RTL co-simulation finished: PASS ***
Finished C/RTL cosimulation.
Starting C/RTL cosimulation ...
/media/masaaki/Ubuntu_Disk/tools/Xilinx/Vitis/2020.1/bin/vitis_hls /media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/cosim.tcl
INFO: [HLS 200-10] Running '/media/masaaki/Ubuntu_Disk/tools/Xilinx/Vitis/2020.1/bin/unwrapped/lnx64.o/vitis_hls'
INFO: [HLS 200-10] For user 'masaaki' on host 'masaaki-H110M4-M01' (Linux_x86_64 version 4.15.0-115-generic) on Thu Sep 10 03:39:27 JST 2020
INFO: [HLS 200-10] On os Ubuntu 18.04.5 LTS
INFO: [HLS 200-10] In directory '/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar'
WARNING: [HLS 200-40] Environment variable 'C_INCLUDE_PATH' is set to :/usr/local/cuda/include.
Sourcing Tcl script '/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/cosim.tcl'
INFO: [HLS 200-10] Opening project '/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint'.
INFO: [HLS 200-10] Adding design file 'multi_apuint/multi_apuint.cpp' to the project
INFO: [HLS 200-10] Adding test bench file 'multi_apuint/multi_apuint_tb.cpp' to the project
INFO: [HLS 200-10] Opening solution '/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1'.
INFO: [SYN 201-201] Setting up clock 'default' with a period of 10ns.
INFO: [HLS 200-10] Setting target device to 'xc7z020-clg400-1'
INFO: [HLS 200-1505] Using flow_target 'vivado'
Resolution: For help on HLS 200-1505 see www.xilinx.com/html_docs/xilinx2020_1/hls-guidance/200-1505.html
INFO: [HLS 200-1464] Running solution command: config_export -format=ip_catalog
INFO: [HLS 200-1464] Running solution command: config_export -rtl=verilog
INFO: [SYN 201-201] Setting up clock 'default' with a period of 10ns.
INFO: [COSIM 212-47] Using XSIM for RTL simulation.
INFO: [COSIM 212-14] Instrumenting C test bench ...
Build using "/media/masaaki/Ubuntu_Disk/tools/Xilinx/Vivado/2020.1/tps/lnx64/gcc-6.2.0/bin/g++"
Compiling multi_apuint_tb.cpp_pre.cpp.tb.cpp
Compiling apatb_multi_apuint.cpp
Compiling multi_apuint.cpp_pre.cpp.tb.cpp
Generating cosim.tv.exe
INFO: [COSIM 212-302] Starting C TB testing ...
multi_out = 0
multi_out = 2
multi_out = 6
multi_out = 12
multi_out = 20
multi_out = 30
multi_out = 42
multi_out = 56
multi_out = 72
multi_out = 90
INFO: [COSIM 212-333] Generating C post check test bench ...
INFO: [COSIM 212-12] Generating RTL test bench ...
apatb_multi_apuint_top.AESL_clock 0 apatb_multi_apuint_top.AESL_reset 1
INFO: [COSIM 212-1] *** C/RTL co-simulation file generation completed. ***
INFO: [COSIM 212-323] Starting verilog simulation.
INFO: [COSIM 212-15] Starting XSIM ...
Vivado Simulator 2020.1
Copyright 1986-1999, 2001-2020 Xilinx, Inc. All Rights Reserved.
Running: /media/masaaki/Ubuntu_Disk/tools/Xilinx/Vivado/2020.1/patches/AR75369_vivado_2020_1_preliminary_rev1/vivado/bin/unwrapped/lnx64.o/xelab xil_defaultlib.apatb_multi_apuint_top xil_defaultlib.glbl -prj multi_apuint.prj -L smartconnect_v1_0 -L axi_protocol_checker_v1_1_12 -L axi_protocol_checker_v1_1_13 -L axis_protocol_checker_v1_1_11 -L axis_protocol_checker_v1_1_12 -L xil_defaultlib -L unisims_ver -L xpm --lib ieee_proposed=./ieee_proposed -L uvm -relax -i ./svr -i ./svtb -i ./file_agent -i ./multi_apuint_subsystem -s multi_apuint -debug wave
Multi-threading is on. Using 2 slave threads.
WARNING: [XSIM 43-3431] One or more environment variables have been detected which affect the operation of the C compiler. These are typically not set in standard installations and are not tested by Xilinx, however they may be appropriate for your system, so the flow will attempt to continue. If errors occur, try running xelab with the "-mt off -v 1" switches to see more information from the C compiler. The following environment variables have been detected:
C_INCLUDE_PATH
LIBRARY_PATH
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/glbl.v" into library xil_defaultlib
INFO: [VRFC 10-311] analyzing module glbl
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/multi_apuint.autotb.v" into library xil_defaultlib
INFO: [VRFC 10-311] analyzing module apatb_multi_apuint_top
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/multi_apuint.v" into library xil_defaultlib
INFO: [VRFC 10-311] analyzing module multi_apuint
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/multi_apuint_mul_8ns_8ns_16_1_1.v" into library xil_defaultlib
INFO: [VRFC 10-311] analyzing module multi_apuint_mul_8ns_8ns_16_1_1_Multiplier_0
INFO: [VRFC 10-311] analyzing module multi_apuint_mul_8ns_8ns_16_1_1
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/regslice_core.v" into library xil_defaultlib
INFO: [VRFC 10-311] analyzing module regslice_both
INFO: [VRFC 10-311] analyzing module regslice_forward
INFO: [VRFC 10-311] analyzing module regslice_reverse
INFO: [VRFC 10-311] analyzing module regslice_both_w1
INFO: [VRFC 10-311] analyzing module regslice_forward_w1
INFO: [VRFC 10-311] analyzing module regslice_reverse_w1
INFO: [VRFC 10-311] analyzing module ibuf
INFO: [VRFC 10-311] analyzing module obuf
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/file_agent/file_agent_pkg.sv" into library xil_defaultlib
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/svr/svr_pkg.sv" into library xil_defaultlib
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/svr/svr_if.sv" into library xil_defaultlib
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/multi_apuint_subsystem/multi_apuint_subsystem_pkg.sv" into library xil_defaultlib
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/svtb/misc_interface.sv" into library xil_defaultlib
INFO: [VRFC 10-2263] Analyzing SystemVerilog file "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/svtb/sv_module_top.sv" into library xil_defaultlib
INFO: [VRFC 10-311] analyzing module sv_module_top
Starting static elaboration
Pass Through NonSizing Optimizer
WARNING: [VRFC 10-3597] non-void function 'write_one_elem' called as a task without void casting [./file_agent/mem_model.sv:143]
WARNING: [VRFC 10-3597] non-void function 'write_elems' called as a task without void casting [./file_agent/mem_model.sv:153]
WARNING: [VRFC 10-3597] non-void function 'read_elems' called as a task without void casting [./file_agent/mem_model.sv:157]
WARNING: [VRFC 10-3597] non-void function 'read_one_elem' called as a task without void casting [./file_agent/mem_model.sv:169]
WARNING: [VRFC 10-3597] non-void function 'read_one_elem' called as a task without void casting [./file_agent/mem_model.sv:190]
WARNING: [VRFC 10-3597] non-void function 'init' called as a task without void casting [./svr/svr_object_global.svh:59]
Completed static elaboration
Starting simulation data flow analysis
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/svtb/sv_module_top.sv" Line 1. Module $unit_sv_module_top_sv has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/multi_apuint.autotb.v" Line 26. Module apatb_multi_apuint_top has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/multi_apuint.v" Line 10. Module multi_apuint has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/multi_apuint_mul_8ns_8ns_16_1_1.v" Line 16. Module multi_apuint_mul_8ns_8ns_16_1_1(ID=1,NUM_STAGE=1,din0_WIDTH=8,din1_WIDTH=8,dout_WIDTH=16) has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/multi_apuint_mul_8ns_8ns_16_1_1.v" Line 8. Module multi_apuint_mul_8ns_8ns_16_1_1_Multiplier_0 has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/regslice_core.v" Line 122. Module regslice_forward(DataWidth=8) has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/regslice_core.v" Line 460. Module obuf(W=9) has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/regslice_core.v" Line 122. Module regslice_forward(DataWidth=8) has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/regslice_core.v" Line 460. Module obuf(W=9) has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/regslice_core.v" Line 122. Module regslice_forward(DataWidth=16) has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/regslice_core.v" Line 460. Module obuf(W=17) has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/svtb/sv_module_top.sv" Line 22. Module sv_module_top has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/svtb/misc_interface.sv" Line 8. Module misc_interface has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/multi_apuint.autotb.v" Line 26. Module apatb_multi_apuint_top has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/multi_apuint.v" Line 10. Module multi_apuint has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/multi_apuint_mul_8ns_8ns_16_1_1.v" Line 16. Module multi_apuint_mul_8ns_8ns_16_1_1(ID=1,NUM_STAGE=1,din0_WIDTH=8,din1_WIDTH=8,dout_WIDTH=16) has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/multi_apuint_mul_8ns_8ns_16_1_1.v" Line 8. Module multi_apuint_mul_8ns_8ns_16_1_1_Multiplier_0 has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/regslice_core.v" Line 122. Module regslice_forward(DataWidth=8) has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/regslice_core.v" Line 460. Module obuf(W=9) has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/regslice_core.v" Line 122. Module regslice_forward(DataWidth=8) has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/regslice_core.v" Line 460. Module obuf(W=9) has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/regslice_core.v" Line 122. Module regslice_forward(DataWidth=16) has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/regslice_core.v" Line 460. Module obuf(W=17) has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/svtb/sv_module_top.sv" Line 22. Module sv_module_top has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/svtb/misc_interface.sv" Line 8. Module misc_interface has a timescale but at least one module in design doesn't have timescale.
WARNING: [XSIM 43-4100] "/media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/glbl.v" Line 6. Module glbl has a timescale but at least one module in design doesn't have timescale.
Completed simulation data flow analysis
Time Resolution for simulation is 1ps
Compiling package uvm.uvm_pkg
Compiling package std.std
Compiling package xil_defaultlib.svr_pkg
Compiling package xil_defaultlib.file_agent_pkg
WARNING: [XSIM 43-3373] "./file_agent/file_read_agent.sv" Line 424. System function $sscanf is used as system task. This system function should have a LHS e.g. x=$sscanf().
Compiling package xil_defaultlib.$unit_sv_module_top_sv
Compiling package xil_defaultlib.multi_apuint_subsystem_pkg
Compiling module xil_defaultlib.multi_apuint_mul_8ns_8ns_16_1_1_...
Compiling module xil_defaultlib.multi_apuint_mul_8ns_8ns_16_1_1(...
Compiling module xil_defaultlib.obuf(W=9)
Compiling module xil_defaultlib.regslice_forward(DataWidth=8)
Compiling module xil_defaultlib.obuf(W=17)
Compiling module xil_defaultlib.regslice_forward(DataWidth=16)
Compiling module xil_defaultlib.multi_apuint
Compiling module xil_defaultlib.misc_interface
Compiling module xil_defaultlib.svr_if(DATA_WIDTH=8)
Compiling module xil_defaultlib.svr_if(DATA_WIDTH=16)
Compiling module xil_defaultlib.sv_module_top
Compiling module xil_defaultlib.apatb_multi_apuint_top
Compiling module xil_defaultlib.glbl
Built simulation snapshot multi_apuint
****** Webtalk v2020.1_AR75369 (64-bit)
**** SW Build 2902540 on Wed May 27 19:54:35 MDT 2020
**** IP Build 2902112 on Wed May 27 22:43:36 MDT 2020
** Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
source /media/masaaki/Ubuntu_Disk/Vitis_HLS/Tsukuba_seminar/multi_apuint/solution1/sim/verilog/xsim.dir/multi_apuint/webtalk/xsim_webtalk.tcl -notrace
INFO: [Common 17-206] Exiting Webtalk at Thu Sep 10 03:40:32 2020...
****** xsim v2020.1_AR75369 (64-bit)
**** SW Build 2902540 on Wed May 27 19:54:35 MDT 2020
**** IP Build 2902112 on Wed May 27 22:43:36 MDT 2020
** Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
source xsim.dir/multi_apuint/xsim_script.tcl
# xsim {multi_apuint} -testplusarg UVM_VERBOSITY=UVM_LOW -testplusarg UVM_TESTNAME=multi_apuint_test_lib -testplusarg UVM_TIMEOUT=20000000000000 -autoloadwcfg -tclbatch {multi_apuint.tcl}
Vivado Simulator 2020.1
Time resolution is 1 ps
source multi_apuint.tcl
## log_wave -r /
## set designtopgroup [add_wave_group "Design Top Signals"]
## set coutputgroup [add_wave_group "C Outputs" -into $designtopgroup]
## set multi_out_group [add_wave_group multi_out(wire) -into $coutputgroup]
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_out_ap_vld -into $multi_out_group -color #ffff00 -radix hex
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_out -into $multi_out_group -radix hex
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_out_ap_ack -into $multi_out_group -color #ffff00 -radix hex
## set cinputgroup [add_wave_group "C Inputs" -into $designtopgroup]
## set multi_in0_group [add_wave_group multi_in0(wire) -into $cinputgroup]
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_in0_ap_ack -into $multi_in0_group -color #ffff00 -radix hex
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_in0 -into $multi_in0_group -radix hex
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_in0_ap_vld -into $multi_in0_group -color #ffff00 -radix hex
## set multi_in1_group [add_wave_group multi_in1(wire) -into $cinputgroup]
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_in1_ap_ack -into $multi_in1_group -color #ffff00 -radix hex
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_in1 -into $multi_in1_group -radix hex
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/multi_in1_ap_vld -into $multi_in1_group -color #ffff00 -radix hex
## set blocksiggroup [add_wave_group "Block-level IO Handshake" -into $designtopgroup]
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/ap_start -into $blocksiggroup
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/ap_done -into $blocksiggroup
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/ap_idle -into $blocksiggroup
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/ap_ready -into $blocksiggroup
## set resetgroup [add_wave_group "Reset" -into $designtopgroup]
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/ap_rst -into $resetgroup
## set clockgroup [add_wave_group "Clock" -into $designtopgroup]
## add_wave /apatb_multi_apuint_top/AESL_inst_multi_apuint/ap_clk -into $clockgroup
## set testbenchgroup [add_wave_group "Test Bench Signals"]
## set tbinternalsiggroup [add_wave_group "Internal Signals" -into $testbenchgroup]
## set tb_simstatus_group [add_wave_group "Simulation Status" -into $tbinternalsiggroup]
## set tb_portdepth_group [add_wave_group "Port Depth" -into $tbinternalsiggroup]
## add_wave /apatb_multi_apuint_top/AUTOTB_TRANSACTION_NUM -into $tb_simstatus_group -radix hex
## add_wave /apatb_multi_apuint_top/ready_cnt -into $tb_simstatus_group -radix hex
## add_wave /apatb_multi_apuint_top/done_cnt -into $tb_simstatus_group -radix hex
## add_wave /apatb_multi_apuint_top/LENGTH_multi_in0 -into $tb_portdepth_group -radix hex
## add_wave /apatb_multi_apuint_top/LENGTH_multi_in1 -into $tb_portdepth_group -radix hex
## add_wave /apatb_multi_apuint_top/LENGTH_multi_out -into $tb_portdepth_group -radix hex
## set tbcoutputgroup [add_wave_group "C Outputs" -into $testbenchgroup]
## set tb_multi_out_group [add_wave_group multi_out(wire) -into $tbcoutputgroup]
## add_wave /apatb_multi_apuint_top/multi_out_ap_vld -into $tb_multi_out_group -color #ffff00 -radix hex
## add_wave /apatb_multi_apuint_top/multi_out -into $tb_multi_out_group -radix hex
## add_wave /apatb_multi_apuint_top/multi_out_ap_ack -into $tb_multi_out_group -color #ffff00 -radix hex
## set tbcinputgroup [add_wave_group "C Inputs" -into $testbenchgroup]
## set tb_multi_in0_group [add_wave_group multi_in0(wire) -into $tbcinputgroup]
## add_wave /apatb_multi_apuint_top/multi_in0_ap_ack -into $tb_multi_in0_group -color #ffff00 -radix hex
## add_wave /apatb_multi_apuint_top/multi_in0 -into $tb_multi_in0_group -radix hex
## add_wave /apatb_multi_apuint_top/multi_in0_ap_vld -into $tb_multi_in0_group -color #ffff00 -radix hex
## set tb_multi_in1_group [add_wave_group multi_in1(wire) -into $tbcinputgroup]
## add_wave /apatb_multi_apuint_top/multi_in1_ap_ack -into $tb_multi_in1_group -color #ffff00 -radix hex
## add_wave /apatb_multi_apuint_top/multi_in1 -into $tb_multi_in1_group -radix hex
## add_wave /apatb_multi_apuint_top/multi_in1_ap_vld -into $tb_multi_in1_group -color #ffff00 -radix hex
## save_wave_config multi_apuint.wcfg
## run all
UVM_INFO /proj/xbuilds/SWIP/2020.1_0223_2001/installs/lin64/Vivado/2020.1/data/system_verilog/uvm_1.2/xlnx_uvm_package.sv(18601) @ 0: reporter [UVM/RELNOTES]
(Specify +UVM_NO_RELNOTES to turn off this notice)
with `UVM_OBJECT_DO_NOT_NEED_CONSTRUCTOR undefined.
You are using a version of the UVM library that has been compiled
with `UVM_NO_DEPRECATED undefined.
You are using a version of the UVM library that has been compiled
*********** IMPORTANT RELEASE NOTES ************
----------------------------------------------------------------
(C) 2013-2014 NVIDIA Corporation
(C) 2011-2013 Cypress Semiconductor Corp.
(C) 2006-2014 Synopsys, Inc.
(C) 2007-2014 Cadence Design Systems, Inc.
(C) 2007-2014 Mentor Graphics Corporation
----------------------------------------------------------------
UVM_INFO /proj/xbuilds/SWIP/2020.1_0223_2001/installs/lin64/Vivado/2020.1/data/system_verilog/uvm_1.2/xlnx_uvm_package.sv(18648) @ 0: reporter [NO_DPI_TSTNAME] UVM_NO_DPI defined--getting UVM_TESTNAME directly, without DPI
UVM_INFO @ 0: reporter [RNTST] Running test multi_apuint_test_lib...
UVM_INFO ./svtb/multi_apuint_test_lib.sv(29) @ 0: uvm_test_top [uvm_test_top] build_phase done
UVM_INFO ./multi_apuint_subsystem/multi_apuint_env.sv(138) @ 0: uvm_test_top.top_env [uvm_test_top.top_env] set reference model by uvm_config_db
UVM_INFO ./multi_apuint_subsystem/multi_apuint_env.sv(145) @ 0: uvm_test_top.top_env [uvm_test_top.top_env] build_phase done
UVM_INFO ./svr/svr_env.sv(27) @ 0: uvm_test_top.top_env.env_master_svr_multi_in0 [uvm_test_top.top_env.env_master_svr_multi_in0] build_phase is called
UVM_INFO ./svr/svr_master_sequencer.sv(12) @ 0: uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.sqr [uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.sqr] new is called
UVM_INFO ./svr/svr_master_driver.sv(15) @ 0: uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.drv [uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.drv] new is called
UVM_INFO ./svr/svr_master_monitor.sv(34) @ 0: uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.mon [uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.mon] new is called
UVM_INFO ./svr/svr_master_driver.sv(25) @ 0: uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.drv [uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.drv] build_phase is called
UVM_INFO ./svr/svr_master_monitor.sv(41) @ 0: uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.mon [uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.mon] build_phase is called
UVM_INFO ./svr/svr_env.sv(27) @ 0: uvm_test_top.top_env.env_master_svr_multi_in1 [uvm_test_top.top_env.env_master_svr_multi_in1] build_phase is called
UVM_INFO ./svr/svr_master_sequencer.sv(12) @ 0: uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.sqr [uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.sqr] new is called
UVM_INFO ./svr/svr_master_driver.sv(15) @ 0: uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.drv [uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.drv] new is called
UVM_INFO ./svr/svr_master_monitor.sv(34) @ 0: uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.mon [uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.mon] new is called
UVM_INFO ./svr/svr_master_driver.sv(25) @ 0: uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.drv [uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.drv] build_phase is called
UVM_INFO ./svr/svr_master_monitor.sv(41) @ 0: uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.mon [uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.mon] build_phase is called
UVM_INFO ./svr/svr_env.sv(27) @ 0: uvm_test_top.top_env.env_slave_svr_multi_out [uvm_test_top.top_env.env_slave_svr_multi_out] build_phase is called
UVM_INFO ./svr/svr_slave_sequencer.sv(12) @ 0: uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.sqr [uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.sqr] new is called
UVM_INFO ./svr/svr_slave_driver.sv(15) @ 0: uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.drv [uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.drv] new is called
UVM_INFO ./svr/svr_slave_monitor.sv(34) @ 0: uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.mon [uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.mon] new is called
UVM_INFO ./svr/svr_slave_driver.sv(25) @ 0: uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.drv [uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.drv] build_phase is called
UVM_INFO ./svr/svr_slave_monitor.sv(41) @ 0: uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.mon [uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.mon] build_phase is called
UVM_INFO ./multi_apuint_subsystem/multi_apuint_env.sv(163) @ 0: uvm_test_top.top_env [uvm_test_top.top_env] connect phase done
UVM_INFO /proj/xbuilds/SWIP/2020.1_0223_2001/installs/lin64/Vivado/2020.1/data/system_verilog/uvm_1.2/xlnx_uvm_package.sv(18752) @ 0: reporter [UVMTOP] UVM testbench topology:
----------------------------------------------------------------------------------------------------------------
Name Type Size Value
----------------------------------------------------------------------------------------------------------------
uvm_test_top multi_apuint_test_lib - @353
top_env multi_apuint_env - @366
env_master_svr_multi_in0 uvm_env - @389
m_agt uvm_agent - @621
drv uvm_driver #(REQ,RSP) - @771
rsp_port uvm_analysis_port - @790
seq_item_port uvm_seq_item_pull_port - @780
mon uvm_monitor - @802
item_collect_port uvm_analysis_port - @819
sqr uvm_sequencer - @632
rsp_export uvm_analysis_export - @641
seq_item_export uvm_seq_item_pull_imp - @759
arbitration_queue array 0 -
lock_queue array 0 -
num_last_reqs integral 32 'd1
num_last_rsps integral 32 'd1
env_master_svr_multi_in1 uvm_env - @402
m_agt uvm_agent - @839
drv uvm_driver #(REQ,RSP) - @989
rsp_port uvm_analysis_port - @1008
seq_item_port uvm_seq_item_pull_port - @998
mon uvm_monitor - @1020
item_collect_port uvm_analysis_port - @1037
sqr uvm_sequencer - @850
rsp_export uvm_analysis_export - @859
seq_item_export uvm_seq_item_pull_imp - @977
arbitration_queue array 0 -
lock_queue array 0 -
num_last_reqs integral 32 'd1
num_last_rsps integral 32 'd1
env_slave_svr_multi_out uvm_env - @412
s_agt uvm_agent - @1057
drv uvm_driver #(REQ,RSP) - @1207
rsp_port uvm_analysis_port - @1226
seq_item_port uvm_seq_item_pull_port - @1216
mon uvm_monitor - @1238
item_collect_port uvm_analysis_port - @1255
sqr uvm_sequencer - @1068
rsp_export uvm_analysis_export - @1077
seq_item_export uvm_seq_item_pull_imp - @1195
arbitration_queue array 0 -
lock_queue array 0 -
num_last_reqs integral 32 'd1
num_last_rsps integral 32 'd1
multi_apuint_virtual_sqr multi_apuint_virtual_sequencer - @479
rsp_export uvm_analysis_export - @488
seq_item_export uvm_seq_item_pull_imp - @606
arbitration_queue array 0 -
lock_queue array 0 -
num_last_reqs integral 32 'd1
num_last_rsps integral 32 'd1
refm multi_apuint_reference_model - @425
trans_num_idx integral 32 'h0
subsys_mon multi_apuint_subsystem_monitor - @440
scbd multi_apuint_scoreboard - @1282
refm multi_apuint_reference_model - @425
trans_num_idx integral 32 'h0
TVOUT_transaction_size_queue da(integral) 0 -
file_wr_port_multi_out_multi_out <unknown> - @1292
TV_FILE string 0 ""
fp integral 32 'hxxxxxxxx
file_open integral 32 'h0
write_file_done integral 32 'h0
write_section_done integral 32 'h0
TRANSACTION_NUM integral 32 'h0
transaction_num_idx integral 32 'h0
TRANSACTION_DEPTH integral 32 'h0
TRANSACTION_DEPTH_queue da(integral) 0 -
TRANSACTION_DEPTH_queue_for_depth_check da(integral) 0 -
transaction_depth_idx integral 32 'h0
ap_done_num_idx integral 32 'h0
write_file_done_multi_out_multi_out integral 32 'h0
write_section_done_multi_out_multi_out integral 32 'h0
svr_master_multi_in0_imp uvm_analysis_imp_svr_master_multi_in0 - @449
svr_master_multi_in1_imp uvm_analysis_imp_svr_master_multi_in1 - @459
svr_slave_multi_out_imp uvm_analysis_imp_svr_slave_multi_out - @469
env_master_svr_multi_in0 uvm_env - @389
env_master_svr_multi_in1 uvm_env - @402
env_slave_svr_multi_out uvm_env - @412
refm multi_apuint_reference_model - @425
multi_apuint_virtual_sqr multi_apuint_virtual_sequencer - @479
multi_apuint_cfg multi_apuint_config - @382
port_multi_in0_cfg svr_config - @383
svr_type svr_inst_type 32 SVR_MASTER
prt_type svr_protocol_type 32 AP_HS
is_active svr_active_passive_enum 1 SVR_ACTIVE
reset_level svr_reset_level_enum 1 RESET_LEVEL_HIGH
clatency svr_latency_multi_in0 - @422
transfer_latency integral 32 'h0
port_multi_in1_cfg svr_config - @385
svr_type svr_inst_type 32 SVR_MASTER
prt_type svr_protocol_type 32 AP_HS
is_active svr_active_passive_enum 1 SVR_ACTIVE
reset_level svr_reset_level_enum 1 RESET_LEVEL_HIGH
clatency svr_latency_multi_in1 - @423
transfer_latency integral 32 'h0
port_multi_out_cfg svr_config - @387
svr_type svr_inst_type 32 SVR_SLAVE
prt_type svr_protocol_type 32 AP_HS
is_active svr_active_passive_enum 1 SVR_ACTIVE
reset_level svr_reset_level_enum 1 RESET_LEVEL_HIGH
clatency svr_latency_multi_out - @424
transfer_latency integral 32 'h0
check_ena integral 32 'h0
cover_ena integral 32 'h0
----------------------------------------------------------------------------------------------------------------
UVM_INFO /proj/xbuilds/SWIP/2020.1_0223_2001/installs/lin64/Vivado/2020.1/data/system_verilog/uvm_1.2/xlnx_uvm_package.sv(20867) @ 0: reporter [UVM/COMP/NAMECHECK] This implementation of the component name checks requires DPI to be enabled
UVM_INFO ./svtb/multi_apuint_subsys_test_sequence_lib.sv(17) @ 0: reporter@@multi_apuint_subsys_test_sequence_lib [multi_apuint_subsys_test_sequence_lib] new is called
UVM_INFO ./multi_apuint_subsystem/multi_apuint_env.sv(168) @ 0: uvm_test_top.top_env [uvm_test_top.top_env] multi_apuint_env is running
UVM_INFO ./file_agent/file_write_agent.sv(256) @ 0: reporter [file_wr_port_multi_out_multi_out] open file ../tv/rtldatafile/rtl.multi_apuint.autotvout_multi_out.dat for write
UVM_INFO ./file_agent/file_write_agent.sv(295) @ 0: reporter [file_wr_port_multi_out_multi_out] config write file with transaction number 10
UVM_INFO ./svr/svr_slave_monitor.sv(62) @ 0: uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.mon [uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.mon] run_phase is called
UVM_INFO ./svr/svr_slave_driver.sv(34) @ 0: uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.drv [uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.drv] run_phase is called
UVM_INFO ./svr/svr_master_driver.sv(35) @ 0: uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.drv [uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.drv] run_phase is called
UVM_INFO ./svr/svr_master_driver.sv(35) @ 0: uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.drv [uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.drv] run_phase is called
UVM_INFO ./svtb/multi_apuint_subsys_test_sequence_lib.sv(45) @ 0: uvm_test_top.top_env.multi_apuint_virtual_sqr@@multi_apuint_subsys_test_sequence_lib [uvm_test_top.top_env.multi_apuint_virtual_sqr.multi_apuint_subsys_test_sequence_lib] get reference model by uvm_config_db
UVM_INFO ./svtb/multi_apuint_subsys_test_sequence_lib.sv(47) @ 0: uvm_test_top.top_env.multi_apuint_virtual_sqr@@multi_apuint_subsys_test_sequence_lib [uvm_test_top.top_env.multi_apuint_virtual_sqr.multi_apuint_subsys_test_sequence_lib] body is called
UVM_INFO ./svtb/multi_apuint_subsys_test_sequence_lib.sv(50) @ 0: uvm_test_top.top_env.multi_apuint_virtual_sqr@@multi_apuint_subsys_test_sequence_lib [uvm_test_top.top_env.multi_apuint_virtual_sqr.multi_apuint_subsys_test_sequence_lib] starting_phase not null
////////////////////////////////////////////////////////////////////////////////////
// Inter-Transaction Progress: Completed Transaction / Total Transaction
// Intra-Transaction Progress: Measured Latency / Latency Estimation * 100%
//
// RTL Simulation : "Inter-Transaction Progress" ["Intra-Transaction Progress"] @ "Simulation Time"
////////////////////////////////////////////////////////////////////////////////////
// RTL Simulation : 0 / 10 [0.00%] @ "125000"
UVM_INFO ./svr/svr_base_sequence.sv(45) @ 1145000: reporter@@svr_port_multi_in0_seq [svr_port_multi_in0_seq] new is called
UVM_INFO ./svr/svr_master_sequence.sv(21) @ 1145000: reporter@@svr_port_multi_in0_seq [svr_port_multi_in0_seq] new is called
UVM_INFO ./file_agent/file_read_agent.sv(142) @ 1145000: reporter [file_rd] open file ../tv/cdatafile/c.multi_apuint.autotvin_multi_in0.dat for read
UVM_INFO ./svr/svr_base_sequence.sv(45) @ 1145000: reporter@@svr_port_multi_in1_seq [svr_port_multi_in1_seq] new is called
UVM_INFO ./svr/svr_master_sequence.sv(21) @ 1145000: reporter@@svr_port_multi_in1_seq [svr_port_multi_in1_seq] new is called
UVM_INFO ./file_agent/file_read_agent.sv(142) @ 1145000: reporter [file_rd] open file ../tv/cdatafile/c.multi_apuint.autotvin_multi_in1.dat for read
UVM_INFO ./svr/svr_base_sequence.sv(45) @ 1145000: reporter@@svr_port_multi_out_seq [svr_port_multi_out_seq] new is called
UVM_INFO ./svr/svr_slave_sequence.sv(18) @ 1145000: reporter@@svr_port_multi_out_seq [svr_port_multi_out_seq] new is called
UVM_INFO ./svr/svr_master_sequence.sv(28) @ 1145000: uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.sqr@@multi_apuint_subsys_test_sequence_lib.svr_port_multi_in0_seq [uvm_test_top.top_env.multi_apuint_virtual_sqr.multi_apuint_subsys_test_sequence_lib.svr_port_multi_in0_seq] body is called
UVM_INFO ./file_agent/file_read_agent.sv(344) @ 1145000: reporter [file_rd] read file done
UVM_INFO ./svr/svr_master_sequence.sv(28) @ 1145000: uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.sqr@@multi_apuint_subsys_test_sequence_lib.svr_port_multi_in1_seq [uvm_test_top.top_env.multi_apuint_virtual_sqr.multi_apuint_subsys_test_sequence_lib.svr_port_multi_in1_seq] body is called
UVM_INFO ./file_agent/file_read_agent.sv(344) @ 1145000: reporter [file_rd] read file done
UVM_INFO ./svr/svr_slave_sequence.sv(23) @ 1145000: uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.sqr@@multi_apuint_subsys_test_sequence_lib.svr_port_multi_out_seq [uvm_test_top.top_env.multi_apuint_virtual_sqr.multi_apuint_subsys_test_sequence_lib.svr_port_multi_out_seq] body is called
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(80) @ 1155000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_ready_for_nexttrans
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(127) @ 1155000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_READY
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(80) @ 1185000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_ready_for_nexttrans
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(127) @ 1185000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_READY
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(102) @ 1195000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_done_for_nexttrans
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(119) @ 1195000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_DONE
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(80) @ 1195000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_ready_for_nexttrans
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(127) @ 1195000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_READY
// RTL Simulation : 1 / 10 [50.00%] @ "1195000"
UVM_INFO ./multi_apuint_subsystem/multi_apuint_scoreboard.sv(54) @ 1195000: uvm_test_top.top_env.subsys_mon.scbd [uvm_test_top.top_env.subsys_mon.scbd] receive ap_done_for_nexttrans and do axim dump
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(127) @ 1215000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_READY
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(80) @ 1215000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_ready_for_nexttrans
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(119) @ 1215000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_DONE
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(102) @ 1215000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_done_for_nexttrans
// RTL Simulation : 2 / 10 [100.00%] @ "1215000"
UVM_INFO ./multi_apuint_subsystem/multi_apuint_scoreboard.sv(54) @ 1215000: uvm_test_top.top_env.subsys_mon.scbd [uvm_test_top.top_env.subsys_mon.scbd] receive ap_done_for_nexttrans and do axim dump
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(102) @ 1235000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_done_for_nexttrans
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(119) @ 1235000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_DONE
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(80) @ 1235000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_ready_for_nexttrans
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(127) @ 1235000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_READY
// RTL Simulation : 3 / 10 [150.00%] @ "1235000"
UVM_INFO ./multi_apuint_subsystem/multi_apuint_scoreboard.sv(54) @ 1235000: uvm_test_top.top_env.subsys_mon.scbd [uvm_test_top.top_env.subsys_mon.scbd] receive ap_done_for_nexttrans and do axim dump
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(102) @ 1265000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_done_for_nexttrans
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(119) @ 1265000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_DONE
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(80) @ 1265000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_ready_for_nexttrans
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(127) @ 1265000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_READY
// RTL Simulation : 4 / 10 [200.00%] @ "1265000"
UVM_INFO ./multi_apuint_subsystem/multi_apuint_scoreboard.sv(54) @ 1265000: uvm_test_top.top_env.subsys_mon.scbd [uvm_test_top.top_env.subsys_mon.scbd] receive ap_done_for_nexttrans and do axim dump
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(102) @ 1275000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_done_for_nexttrans
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(119) @ 1275000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_DONE
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(80) @ 1275000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_ready_for_nexttrans
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(127) @ 1275000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_READY
// RTL Simulation : 5 / 10 [150.00%] @ "1275000"
UVM_INFO ./multi_apuint_subsystem/multi_apuint_scoreboard.sv(54) @ 1275000: uvm_test_top.top_env.subsys_mon.scbd [uvm_test_top.top_env.subsys_mon.scbd] receive ap_done_for_nexttrans and do axim dump
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(127) @ 1295000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_READY
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(80) @ 1295000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_ready_for_nexttrans
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(119) @ 1295000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_DONE
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(102) @ 1295000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_done_for_nexttrans
// RTL Simulation : 6 / 10 [100.00%] @ "1295000"
UVM_INFO ./multi_apuint_subsystem/multi_apuint_scoreboard.sv(54) @ 1295000: uvm_test_top.top_env.subsys_mon.scbd [uvm_test_top.top_env.subsys_mon.scbd] receive ap_done_for_nexttrans and do axim dump
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(127) @ 1305000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_READY
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(80) @ 1305000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_ready_for_nexttrans
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(119) @ 1305000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_DONE
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(102) @ 1305000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_done_for_nexttrans
// RTL Simulation : 7 / 10 [100.00%] @ "1305000"
UVM_INFO ./multi_apuint_subsystem/multi_apuint_scoreboard.sv(54) @ 1305000: uvm_test_top.top_env.subsys_mon.scbd [uvm_test_top.top_env.subsys_mon.scbd] receive ap_done_for_nexttrans and do axim dump
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(127) @ 1315000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_READY
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(80) @ 1315000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_ready_for_nexttrans
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(119) @ 1315000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_DONE
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(102) @ 1315000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_done_for_nexttrans
// RTL Simulation : 8 / 10 [50.00%] @ "1315000"
UVM_INFO ./multi_apuint_subsystem/multi_apuint_scoreboard.sv(54) @ 1315000: uvm_test_top.top_env.subsys_mon.scbd [uvm_test_top.top_env.subsys_mon.scbd] receive ap_done_for_nexttrans and do axim dump
UVM_INFO ./svr/svr_master_sequence.sv(90) @ 1315000: uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.sqr@@multi_apuint_subsys_test_sequence_lib.svr_port_multi_in0_seq [uvm_test_top.top_env.multi_apuint_virtual_sqr.multi_apuint_subsys_test_sequence_lib.svr_port_multi_in0_seq] send all TVs done
UVM_INFO ./svr/svr_master_sequence.sv(90) @ 1315000: uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.sqr@@multi_apuint_subsys_test_sequence_lib.svr_port_multi_in1_seq [uvm_test_top.top_env.multi_apuint_virtual_sqr.multi_apuint_subsys_test_sequence_lib.svr_port_multi_in1_seq] send all TVs done
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(119) @ 1325000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_DONE
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(102) @ 1325000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_done_for_nexttrans
// RTL Simulation : 9 / 10 [50.00%] @ "1325000"
UVM_INFO ./multi_apuint_subsystem/multi_apuint_scoreboard.sv(54) @ 1325000: uvm_test_top.top_env.subsys_mon.scbd [uvm_test_top.top_env.subsys_mon.scbd] receive ap_done_for_nexttrans and do axim dump
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(119) @ 1355000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event DUT2TB_AP_DONE
UVM_INFO ./multi_apuint_subsystem/multi_apuint_reference_model.sv(102) @ 1355000: uvm_test_top.top_env.refm [uvm_test_top.top_env.refm] trigger event ap_done_for_nexttrans
// RTL Simulation : 10 / 10 [100.00%] @ "1355000"
////////////////////////////////////////////////////////////////////////////////////
UVM_INFO ./multi_apuint_subsystem/multi_apuint_scoreboard.sv(54) @ 1355000: uvm_test_top.top_env.subsys_mon.scbd [uvm_test_top.top_env.subsys_mon.scbd] receive ap_done_for_nexttrans and do axim dump
UVM_INFO ./svtb/multi_apuint_subsys_test_sequence_lib.sv(145) @ 1355000: uvm_test_top.top_env.multi_apuint_virtual_sqr@@multi_apuint_subsys_test_sequence_lib [uvm_test_top.top_env.multi_apuint_virtual_sqr.multi_apuint_subsys_test_sequence_lib] autotb finished
UVM_INFO ./multi_apuint_subsystem/multi_apuint_scoreboard.sv(59) @ 1355000: uvm_test_top.top_env.subsys_mon.scbd [uvm_test_top.top_env.subsys_mon.scbd] receive FINISH
UVM_INFO /proj/xbuilds/SWIP/2020.1_0223_2001/installs/lin64/Vivado/2020.1/data/system_verilog/uvm_1.2/xlnx_uvm_package.sv(19968) @ 1425000: reporter [TEST_DONE] 'run' phase is ready to proceed to the 'extract' phase
UVM_INFO /proj/xbuilds/SWIP/2020.1_0223_2001/installs/lin64/Vivado/2020.1/data/system_verilog/uvm_1.2/xlnx_uvm_package.sv(13673) @ 1425000: reporter [UVM/REPORT/SERVER] [uvm_test_top.top_env.subsys_mon.scbd] 11
[uvm_test_top.top_env.refm] 40
[uvm_test_top.top_env.multi_apuint_virtual_sqr.multi_apuint_subsys_test_sequence_lib.svr_port_multi_out_seq] 1
[uvm_test_top.top_env.multi_apuint_virtual_sqr.multi_apuint_subsys_test_sequence_lib.svr_port_multi_in1_seq] 2
[uvm_test_top.top_env.multi_apuint_virtual_sqr.multi_apuint_subsys_test_sequence_lib.svr_port_multi_in0_seq] 2
[uvm_test_top.top_env.multi_apuint_virtual_sqr.multi_apuint_subsys_test_sequence_lib] 4
[uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.sqr] 1
[uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.mon] 3
[uvm_test_top.top_env.env_slave_svr_multi_out.s_agt.drv] 3
[uvm_test_top.top_env.env_slave_svr_multi_out] 1
[uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.sqr] 1
[uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.mon] 2
[uvm_test_top.top_env.env_master_svr_multi_in1.m_agt.drv] 3
[uvm_test_top.top_env.env_master_svr_multi_in1] 1
[uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.sqr] 1
[uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.mon] 2
[uvm_test_top.top_env.env_master_svr_multi_in0.m_agt.drv] 3
[uvm_test_top.top_env.env_master_svr_multi_in0] 1
[uvm_test_top.top_env] 4
[uvm_test_top] 1
[svr_port_multi_out_seq] 2
[svr_port_multi_in1_seq] 2
[svr_port_multi_in0_seq] 2
[multi_apuint_subsys_test_sequence_lib] 1
[file_wr_port_multi_out_multi_out] 2
[file_rd] 4
[UVMTOP] 1
[UVM/RELNOTES] 1
[UVM/COMP/NAMECHECK] 1
[TEST_DONE] 1
[RNTST] 1
[NO_DPI_TSTNAME] 1
** Report counts by id
UVM_FATAL : 0
UVM_ERROR : 0
UVM_WARNING : 0
UVM_INFO : 106
** Report counts by severity
--- UVM Report Summary ---
$finish called at time : 1425 ns : File "/media/masaaki/Ubuntu_Disk/tools/Xilinx/Vivado/2020.1/data/system_verilog/uvm_1.2/xlnx_uvm_package.sv" Line 18699
## quit
INFO: [Common 17-206] Exiting xsim at Thu Sep 10 03:40:42 2020...
INFO: [COSIM 212-316] Starting C post checking ...
multi_out = 0
multi_out = 2
multi_out = 6
multi_out = 12
multi_out = 20
multi_out = 30
multi_out = 42
multi_out = 56
multi_out = 72
multi_out = 90
INFO: [COSIM 212-1000] *** C/RTL co-simulation finished: PASS ***
Finished C/RTL cosimulation.
ということだ。データ転送をランダムにストールさせて様子を見るのか? クロックが無いので、ストールはしないようだが、後で効果を見てみよう。各データ転送にランダムなストールを適用します。
Vitis HLS 2020.1
Vivado HLS 2020.1
Vitis HLS 2020.1 は余計というか、自分で作っていない関数がいっぱい表示されるのはなぜなのか?
Vitis HLS 2020.1
Vitis HLS 2020.1のデフォルトの表示はこれだが、Vivado HLS と同じ表示も syn の report を見ればある。
Vivado HLS 2020.1
Vitis HLS 2020.1
トップの multi_apuint.v と multi_apuint_mul_8ns_8ns_16_1_1.v の 2 つの Verilog HDL ファイルができている。
Vivado HLS 2020.1
トップの multi_apuint.v の 1 つだけだ。
Vitis HLS 2020.1 の multi_apuint.v を示す。
// ==============================================================
// RTL generated by Vitis HLS - High-Level Synthesis from C, C++ and OpenCL
// Version: 2020.1
// Copyright (C) 1986-2020 Xilinx, Inc. All Rights Reserved.
//
// ===========================================================
`timescale 1 ns / 1 ps
(* CORE_GENERATION_INFO="multi_apuint_multi_apuint,hls_ip_2020_1,{HLS_INPUT_TYPE=cxx,HLS_INPUT_FLOAT=0,HLS_INPUT_FIXED=0,HLS_INPUT_PART=xc7z020-clg400-1,HLS_INPUT_CLOCK=10.000000,HLS_INPUT_ARCH=others,HLS_SYN_CLOCK=4.170000,HLS_SYN_LAT=0,HLS_SYN_TPT=none,HLS_SYN_MEM=0,HLS_SYN_DSP=0,HLS_SYN_FF=0,HLS_SYN_LUT=41,HLS_VERSION=2020_1}" *)
module multi_apuint (
ap_start,
ap_done,
ap_idle,
ap_ready,
multi_in0,
multi_in1,
multi_out,
multi_out_ap_vld
);
input ap_start;
output ap_done;
output ap_idle;
output ap_ready;
input [7:0] multi_in0;
input [7:0] multi_in1;
output [15:0] multi_out;
output multi_out_ap_vld;
reg multi_out_ap_vld;
wire [15:0] mul_ln1349_fu_51_p2;
wire [7:0] mul_ln1349_fu_51_p0;
wire [7:0] mul_ln1349_fu_51_p1;
wire [15:0] mul_ln1349_fu_51_p00;
wire [15:0] mul_ln1349_fu_51_p10;
multi_apuint_mul_8ns_8ns_16_1_1 #(
.ID( 1 ),
.NUM_STAGE( 1 ),
.din0_WIDTH( 8 ),
.din1_WIDTH( 8 ),
.dout_WIDTH( 16 ))
mul_8ns_8ns_16_1_1_U1(
.din0(mul_ln1349_fu_51_p0),
.din1(mul_ln1349_fu_51_p1),
.dout(mul_ln1349_fu_51_p2)
);
always @ (*) begin
if ((ap_start == 1'b1)) begin
multi_out_ap_vld = 1'b1;
end else begin
multi_out_ap_vld = 1'b0;
end
end
assign ap_done = ap_start;
assign ap_idle = 1'b1;
assign ap_ready = ap_start;
assign mul_ln1349_fu_51_p0 = mul_ln1349_fu_51_p00;
assign mul_ln1349_fu_51_p00 = multi_in1;
assign mul_ln1349_fu_51_p1 = mul_ln1349_fu_51_p10;
assign mul_ln1349_fu_51_p10 = multi_in0;
assign multi_out = mul_ln1349_fu_51_p2;
endmodule //multi_apuint
Vitis HLS 2020.1 の multi_apuint_mul_8ns_8ns_16_1_1.v を示す。// ==============================================================
// Vitis HLS - High-Level Synthesis from C, C++ and OpenCL v2020.1 (64-bit)
// Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
// ==============================================================
`timescale 1 ns / 1 ps
module multi_apuint_mul_8ns_8ns_16_1_1_Multiplier_0(a, b, p);
input[8 - 1 : 0] a;
input[8 - 1 : 0] b;
output[16 - 1 : 0] p;
assign p = $signed({1'b0, a}) * $signed({1'b0, b});
endmodule
`timescale 1 ns / 1 ps
module multi_apuint_mul_8ns_8ns_16_1_1(
din0,
din1,
dout);
parameter ID = 32'd1;
parameter NUM_STAGE = 32'd1;
parameter din0_WIDTH = 32'd1;
parameter din1_WIDTH = 32'd1;
parameter dout_WIDTH = 32'd1;
input[din0_WIDTH - 1:0] din0;
input[din1_WIDTH - 1:0] din1;
output[dout_WIDTH - 1:0] dout;
multi_apuint_mul_8ns_8ns_16_1_1_Multiplier_0 multi_apuint_mul_8ns_8ns_16_1_1_Multiplier_0_U(
.a( din0 ),
.b( din1 ),
.p( dout ));
endmodule
Vivado HLS 2020.1 の multi_apuint.v を示す。// ==============================================================
// RTL generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and OpenCL
// Version: 2020.1_AR75369
// Copyright (C) 1986-2020 Xilinx, Inc. All Rights Reserved.
//
// ===========================================================
`timescale 1 ns / 1 ps
(* CORE_GENERATION_INFO="multi_apuint,hls_ip_2020_1_AR75369,{HLS_INPUT_TYPE=cxx,HLS_INPUT_FLOAT=0,HLS_INPUT_FIXED=1,HLS_INPUT_PART=xc7z020-clg400-1,HLS_INPUT_CLOCK=10.000000,HLS_INPUT_ARCH=others,HLS_SYN_CLOCK=4.170000,HLS_SYN_LAT=0,HLS_SYN_TPT=none,HLS_SYN_MEM=0,HLS_SYN_DSP=0,HLS_SYN_FF=0,HLS_SYN_LUT=41,HLS_VERSION=2020_1_AR75369}" *)
module multi_apuint (
ap_start,
ap_done,
ap_idle,
ap_ready,
multi_in0_V,
multi_in1_V,
multi_out_V,
multi_out_V_ap_vld
);
input ap_start;
output ap_done;
output ap_idle;
output ap_ready;
input [7:0] multi_in0_V;
input [7:0] multi_in1_V;
output [15:0] multi_out_V;
output multi_out_V_ap_vld;
reg multi_out_V_ap_vld;
wire [7:0] ret_V_fu_43_p0;
wire [7:0] ret_V_fu_43_p1;
wire [15:0] ret_V_fu_43_p00;
wire [15:0] ret_V_fu_43_p10;
always @ (*) begin
if ((ap_start == 1'b1)) begin
multi_out_V_ap_vld = 1'b1;
end else begin
multi_out_V_ap_vld = 1'b0;
end
end
assign ap_done = ap_start;
assign ap_idle = 1'b1;
assign ap_ready = ap_start;
assign multi_out_V = (ret_V_fu_43_p0 * ret_V_fu_43_p1);
assign ret_V_fu_43_p0 = ret_V_fu_43_p00;
assign ret_V_fu_43_p00 = multi_in1_V;
assign ret_V_fu_43_p1 = ret_V_fu_43_p10;
assign ret_V_fu_43_p10 = multi_in0_V;
endmodule //multi_apuint
// multi_apuint.cpp
#include <ap_int.h>
void multi_apuint(ap_uint<8> multi_in0, ap_uint<8> multi_in1,
ap_uint<16> *multi_out){
*multi_out = multi_in0 * multi_in1;
}
#include <string.h>
#include <ap_int.h>
void multi_apuint(ap_uint<8> multi_in0, ap_uint<8> multi_in1,
ap_uint<16> *multi_out);
int main(){
using namespace std;
ap_uint<8> multi_in0;
ap_uint<8> multi_in1;
ap_uint<16> multi_out;
for (multi_in0=0, multi_in1=1; multi_in0<10; multi_in0++, multi_in1++){
multi_apuint(multi_in0, multi_in1, &multi_out);
cout << "multi_out = " << multi_out << endl;
if (multi_out != (multi_in0 * multi_in1))
return(1);
}
return(0);
}
まずは、Vitis HLS 2020.1 から起動した。
Create Project をクリックする。
Vivado HLS 2020.1 を起動した。
Create New Project をクリックする。
__asm__ __volatile__("VCVTR.S32.F32 s15, s15;");
データ メモリ バリア (DMB)
デー タ同期バ リ ア (DSB)
命令同期バ リ ア (ISB)
__asm__ __volatile__("DSB");
__asm__ __volatile__("ISB");
XDma_pow2_Set_in_r(&XDMA_pow2_ap, (u32)&data[0]);
/* * test_dma.c * * Created on: 2017/12/02 * Author: masaaki */
#include <stdio.h>
#include "xdma_pow2.h"
#include "xparameters.h"
volatile int data[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
//volatile int result[10];
volatile int result[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
void Xil_DCacheFlush(void);
void Xil_DCacheInvalidate(void);
int main(){
XDma_pow2 XDMA_pow2_ap;
XDma_pow2_Config *XDMA_pow2_apPtr;
int i;
printf("%x\n", (unsigned int)data);
printf("%x\n", (unsigned int)result);
// Look Up the device configuration
XDMA_pow2_apPtr = XDma_pow2_LookupConfig(0);
if (!XDMA_pow2_apPtr){
fprintf(stderr, "XDma_pow2 configuration failed.\n");
return(-1);
}
// Initialize the Device
int Xlap_status = XDma_pow2_CfgInitialize(&XDMA_pow2_ap, XDMA_pow2_apPtr);
if (Xlap_status != XST_SUCCESS){
fprintf(stderr, "Could not Initialize XDma_pow2\n");
return(-1);
}
XDma_pow2_Set_in_r(&XDMA_pow2_ap, (u32)&data[0]);
XDma_pow2_Set_out_r(&XDMA_pow2_ap, (u32)&result[0]);
Xil_DCacheFlush();
XDma_pow2_Start(&XDMA_pow2_ap);
while(!XDma_pow2_IsDone(&XDMA_pow2_ap)) ;
Xil_DCacheInvalidate();
for(i=0; i<10; i++){
printf("data[%d] = %d, result[%d] = %d\n", i, data[i], i, result[i]);
}
return 0;
}
volatile int data[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
volatile int result[10];
//volatile int result[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
/* * test_dma.c * * Created on: 2017/12/02 * Author: masaaki */
#include <stdio.h>
#include "xdma_pow2.h"
#include "xparameters.h"
volatile int data[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
volatile int result[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
void Xil_DCacheFlush(void);
int main(){
XDma_pow2 XDMA_pow2_ap;
XDma_pow2_Config *XDMA_pow2_apPtr;
int i;
// Look Up the device configuration
XDMA_pow2_apPtr = XDma_pow2_LookupConfig(0);
if (!XDMA_pow2_apPtr){
fprintf(stderr, "XDma_pow2 configuration failed.\n");
return(-1);
}
// Initialize the Device
int Xlap_status = XDma_pow2_CfgInitialize(&XDMA_pow2_ap, XDMA_pow2_apPtr);
if (Xlap_status != XST_SUCCESS){
fprintf(stderr, "Could not Initialize XDma_pow2\n");
return(-1);
}
XDma_pow2_Set_in_r(&XDMA_pow2_ap, (u32)&data[0]);
XDma_pow2_Set_out_r(&XDMA_pow2_ap, (u32)&result[0]);
Xil_DCacheFlush();
XDma_pow2_Start(&XDMA_pow2_ap);
while(!XDma_pow2_IsDone(&XDMA_pow2_ap)) ;
for(i=0; i<10; i++){
printf("data[%d] = %d, result[%d] = %d\n", i, data[i], i, result[i]);
}
return 0;
}
日 | 月 | 火 | 水 | 木 | 金 | 土 |
---|---|---|---|---|---|---|
- | - | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | - | - | - |