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

Subversion Repositories spacewiresystemc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /spacewiresystemc/trunk/vpi/vpi_test_stress
    from Rev 12 to Rev 13
    Reverse comparison

Rev 12 → Rev 13

/env_global_spw.cpp
30,6 → 30,7
s_vpi_value sin_value;
s_vpi_value fsm_value;
s_vpi_value value_to_tx;
s_vpi_value value_to_tx_timec;
s_vpi_value value_to_rx;
 
s_vpi_value value_to_fsm;
47,6 → 48,8
#define WAIT_500_CYCLES 1
 
unsigned int state_test=0;
unsigned int state_test_tx_timec=0;
unsigned int timecode=0;
 
unsigned int state_test_rx=0;
 
/global_init.h
24,6 → 24,7
position = 0;
counter_null = 0;
state_test_rx=0;
state_test_tx_timec=0;
 
lib_handle = dlopen("./final_spw.so", RTLD_LAZY);
 
/write_tx_time_code_spw_ultra_light.h
1,7 → 1,72
static int write_tx_time_code_spw_ultra_light_calltf(char*user_data)
{
vpiHandle TX_DATA = vpi_handle_by_name("module_tb.TOP_TX_DATA",NULL);
vpiHandle TX_WRITE = vpi_handle_by_name("module_tb.TOP_TX_WRITE",NULL);
vpiHandle TX_TIMEC = vpi_handle_by_name("module_tb.TOP_TX_TIME",NULL);
vpiHandle TX_TICKE = vpi_handle_by_name("module_tb.TOP_TX_TICK",NULL);
vpiHandle TX_TICKREADY = vpi_handle_by_name("module_tb.TOP_TX_READY_TICK",NULL);
 
value_to_tx_timec.format = vpiIntVal;
 
if(SC_TOP->reset_set())
{
 
if(SC_TOP->enable_time_code_tx_test())
{
switch(state_test_tx_timec)
{
case SEND_DATA:
 
value_to_tx_timec.value.integer = 0;
vpi_put_value(TX_TICKE, &value_to_tx_timec, NULL, vpiNoDelay);
state_test_tx_timec = 59;
break;
case 59:
value_to_tx_timec.value.integer = timecode;
vpi_put_value(TX_TIMEC, &value_to_tx_timec, NULL, vpiNoDelay);
 
vpi_get_value(TX_TICKREADY, &value_to_tx_timec);
if(value_to_tx_timec.value.integer == 0)
{
value_to_tx_timec.value.integer = 1;
vpi_put_value(TX_TICKE , &value_to_tx_timec, NULL, vpiNoDelay);
state_test_tx_timec = WAIT_DATA;
}
 
break;
case WAIT_DATA:
vpi_get_value(TX_TICKREADY, &value_to_tx_timec);
if(value_to_tx_timec.value.integer == 1)
{
state_test_tx_timec = 60;
value_to_tx_timec.value.integer = 0;
vpi_put_value(TX_TICKE, &value_to_tx_timec, NULL, vpiNoDelay);
//if(position > SC_TOP->size_data_test())
//{
// value_to_tx.value.integer = 0;
// vpi_put_value(TX_WRITE, &value_to_tx, NULL, vpiNoDelay);
// state_test = 60;
//}
}
else
{
}
break;
case 60:
state_test_tx_timec = SEND_DATA;
timecode = timecode + 1;
break;
}
}
else
{
state_test_tx_timec = SEND_DATA;
}
}
 
return 0;
}

powered by: WebSVN 2.1.0

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