Skip to content
Snippets Groups Projects
Commit 506961c9 authored by Andrea Enrici's avatar Andrea Enrici
Browse files

modified constructor and user to do parameters

parent 5359c2bb
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,7 @@ public class CpuLoadMEC extends CPMEC {
inst_decl = "VOID";
buff_type = "MM_BUFF_TYPE";
buff_init = "VOID";
exec_code = "embb_mem_read_32( uint32_t " + addr + " );";
exec_code = "embb_mem_read_32( (uint32_t) /*USER TO DO: ADDRESS*/ );";
init_code = "VOID";
cleanup_code = "VOID";
}
......
......@@ -50,8 +50,8 @@ import java.util.*;
public class CpuStoreMEC extends CPMEC {
protected String addr = "";
protected String word = "";
/*protected String addr = "";
protected String word = "";*/
public CpuStoreMEC() {
node_type = "CPU";
......@@ -59,7 +59,7 @@ public class CpuStoreMEC extends CPMEC {
inst_decl = "VOID";
buff_type = "MM_BUFF_TYPE";
buff_init = "VOID";
exec_code = "embb_mem_write_32( uint32_t " + addr + ", uint32_t " + word + ");";
exec_code = "embb_mem_write_32( (uint32_t) /*USER TO DO: ADDRESS*/, (uint32_t) /*USER TO DO: WORD*/ );";
init_code = "VOID";
cleanup_code = "VOID";
}
......
......@@ -53,22 +53,16 @@ public class DmaMEC extends CPMEC {
protected String src_dev = "NULL";
protected String dma_dev;
public DmaMEC( String name, String ctx, String src_address, String dst_address, String data_amount, String dst_dev ) {
public DmaMEC() {
dma_dev = dst_dev;
node_type = "DMA";
inst_type = "VOID";
inst_decl = "EMBB_DMA_CONTEXT";
buff_type = "MM_BUFF_TYPE";
buff_init = "VOID";
exec_code = "/*firm instruction*/" + CR +
"embb_dma_start(&" + ctx + ", " + src_address + ", " + dst_address + ", " + data_amount + ");" + CR;
init_code = "/***** INIT DMA*******/" + CR +
"void init_" + name + "( void )\t{" + CR +
"embb_dma_ctx_init(&" + ctx + ", &" + dma_dev + ", &" + dst_dev + ", &" + src_dev + ");" + CR +
"}" + CR;
cleanup_code = "embb_dma_ctx_cleanup(&" + ctx + ");";
exec_code = "embb_dma_start( /*USER TO DO: CTX*/, /*USER TO DO: SRC_ADDRESS*/, /*USER TO DO: DST_ADDRESS*/, /*USER TO DO: NUM_SAMPLES */ );" + CR;
init_code = "embb_dma_ctx_init( /*USER TO DO: CTX*/, /*USER TO DO: DMA_DEVICE*/, /*USER TO DO: DST_DEV*/, /*USER TO DO: SRC_DEV*/ );" + CR;
cleanup_code = "embb_dma_ctx_cleanup( /*USER TO DO: CTX*/ );";
}
} //End of class
......@@ -63,7 +63,7 @@ public class InterleaverMEC extends TaskMEC {
init_code ="/***** INIT " + XOP + " *******/" + CR +
"void init_" + XOP + "( void )\t{" + CR + TAB +
"intl_ctx_init(/* TODO */);" + CR + TAB +
"intl_ctx_init(/*USER TODO*/);" + CR + TAB +
"intl_set_sv( (((INTL_BUFF_TYPE*)sig[" + OD0 + "].pBuff)->base_address), (uint64_t)/*USER TODO*/ );" + CR + TAB +
"intl_set_arm( (((INTL_BUFF_TYPE*)sig[" + OD0 + "].pBuff)->base_address), (uint64_t)/*USER TODO*/ );" + CR + TAB +
"intl_set_re( (((INTL_BUFF_TYPE*)sig[" + OD0 + "].pBuff)->base_address), (uint64_t)/*USER TODO*/ );" + CR + TAB +
......@@ -81,7 +81,7 @@ public class InterleaverMEC extends TaskMEC {
"intl_set_pof( (((INTL_BUFF_TYPE*)sig[" + OD0 + "].pBuff)->base_address), (uint64_t)/*USER TODO*/ );" + CR + TAB +
"intl_set_lenm1( (((INTL_BUFF_TYPE*)sig[" + OD0 + "].pBuff)->base_address), (uint64_t)/*USER TODO*/ );" + CR + TAB +
"}" + CR;
cleanup_code = "intl_ctx_cleanup( /*TODO*/ );";
cleanup_code = "intl_ctx_cleanup( /*USER TODO*/ );";
}
} //End of class
......@@ -63,7 +63,7 @@ public class MapperMEC extends TaskMEC {
init_code ="/***** INIT " + XOP + " *******/" + CR +
"void init_" + XOP + "( void )\t{" + CR + TAB +
"mapper_ctx_init(/* TODO */);" + CR + TAB +
"mapper_ctx_init(/*USER TODO*/);" + CR + TAB +
"mapper_set_lenm1( (((MAPPER_BUFF_TYPE*)sig[" + OD0 + "].pBuff)->base_address), (uint64_t)/*USER TODO*/ );" + CR + TAB +
"mapper_set_lba( (((MAPPER_BUFF_TYPE*)sig[" + OD0 + "].pBuff)->base_address), (uint64_t)/*USER TODO*/ );" + CR + TAB +
"mapper_set_oba( (((MAPPER_BUFF_TYPE*)sig[" + OD0 + "].pBuff)->base_address), (uint64_t)/*USER TODO*/ );" + CR + TAB +
......@@ -76,7 +76,7 @@ public class MapperMEC extends TaskMEC {
"mapper_set_n( (((MAPPER_BUFF_TYPE*)sig[" + OD0 + "].pBuff)->base_address), (uint64_t)/*USER TODO*/ );" + CR + TAB +
"mapper_set_s( (((MAPPER_BUFF_TYPE*)sig[" + OD0 + "].pBuff)->base_address), (uint64_t)/*USER TODO*/ );" + CR + TAB +
"}" + CR;
cleanup_code = "mapper_ctx_cleanup(/* TODO */);";
cleanup_code = "mapper_ctx_cleanup(/*USER TODO*/);";
}
} //End of class
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment