Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mbe-tools
TTool
Commits
35902477
Commit
35902477
authored
6 years ago
by
Daniela Genius
Browse files
Options
Downloads
Patches
Plain Diff
third kind of HWA
parent
e1d34916
No related branches found
Branches containing commit
No related tags found
1 merge request
!72
Syscams
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modeling/LIP6/test_coproc.xml
+16044
-538
16044 additions, 538 deletions
modeling/LIP6/test_coproc.xml
src/main/java/ddtranslatorSoclib/toTopCell/Header.java
+157
-111
157 additions, 111 deletions
src/main/java/ddtranslatorSoclib/toTopCell/Header.java
with
16201 additions
and
649 deletions
modeling/LIP6/test_coproc.xml
+
16044
−
538
View file @
35902477
This diff is collapsed.
Click to expand it.
src/main/java/ddtranslatorSoclib/toTopCell/Header.java
+
157
−
111
View file @
35902477
...
@@ -48,123 +48,169 @@
...
@@ -48,123 +48,169 @@
package
ddtranslatorSoclib.toTopCell
;
package
ddtranslatorSoclib.toTopCell
;
import
ddtranslatorSoclib.*
;
//DG 23.08.
import
ddtranslatorSoclib.*
;
//DG 23.08.
public
class
Header
{
public
class
Header
{
static
private
String
header
;
static
private
String
header
;
int
nb_clusters
=
5
;
int
nb_clusters
=
5
;
private
final
static
String
CR
=
"\n"
;
private
final
static
String
CR
=
"\n"
;
private
final
static
String
CR2
=
"\n\n"
;
private
final
static
String
CR2
=
"\n\n"
;
Header
(){
Header
()
{
}
}
public
static
String
getHeader
()
{
public
static
String
getHeader
()
int
with_vgsb
=
TopCellGenerator
.
avatardd
.
getAllBus
().
size
();
{
int
with_vgsb
=
TopCellGenerator
.
avatardd
.
getAllBus
().
size
();
header
=
"//-------------------------------Header------------------------------------"
+
CR2
+
"#include <iostream>"
+
CR
header
=
+
"#include <cstdlib>"
+
CR
"//-------------------------------Header------------------------------------"
+
"#include <vector>"
+
CR
+
CR2
+
"#include <iostream>"
+
CR
+
"#include <cstdlib>"
+
CR
+
+
"#include <string>"
+
CR
"#include <vector>"
+
CR
+
"#include <string>"
+
CR
+
+
"#include <stdexcept>"
+
CR
"#include <stdexcept>"
+
CR
+
"#include <cstdarg>"
+
CR2
+
+
"#include <cstdarg>"
+
CR2
"#define CONFIG_GDB_SERVER"
+
CR
+
+
"#define CONFIG_GDB_SERVER"
+
CR
"#define CONFIG_SOCLIB_MEMCHECK"
+
CR2
;
+
"#define CONFIG_SOCLIB_MEMCHECK"
+
CR2
;
header
=
header
+
"#include \"iss_memchecker.h\""
+
CR
header
=
header
+
"#include \"iss_memchecker.h\""
+
CR
+
"#include \"gdbserver.h\""
+
CR2
+
"#include \"gdbserver.h\""
+
CR2
+
"#include \"ppc405.h\""
+
CR
+
"#include \"ppc405.h\""
+
CR
+
"#include \"niosII.h\""
+
CR
+
"#include \"niosII.h\""
+
CR
+
"#include \"mips32.h\""
+
CR
+
"#include \"mips32.h\""
+
CR
+
"#include \"arm.h\""
+
CR
+
"#include \"arm.h\""
+
CR
+
"#include \"sparcv8.h\""
+
CR
+
"#include \"sparcv8.h\""
+
CR
+
"#include \"lm32.h\""
+
CR2
+
"#include \"lm32.h\""
+
CR2
+
"#include \"mapping_table.h\""
+
CR
+
"#include \"mapping_table.h\""
+
CR
+
"#include \"vci_fdt_rom.h\""
+
CR
+
"#include \"vci_xcache_wrapper.h\""
+
CR
+
"#include \"vci_fdt_rom.h\""
+
CR
+
+
"#include \"vci_ram.h\""
+
CR
+
"#include \"vci_heterogeneous_rom.h\""
+
CR
"#include \"vci_xcache_wrapper.h\""
+
CR
+
+
"#include \"vci_multi_tty.h\""
+
CR
+
"#include \"vci_locks.h\""
+
CR
+
"#include \"vci_xicu.h\""
+
CR
"#include \"vci_ram.h\""
+
CR
+
+
"#include \"vci_mwmr_stats.h\""
+
CR
;
//DG 20.09.
"#include \"vci_heterogeneous_rom.h\""
+
CR
+
if
(
with_vgsb
>
0
){
"#include \"vci_multi_tty.h\""
+
CR
header
+=
"#include \"vci_vgsb.h\""
+
CR
;
//+ "#include \"vci_locks.h\"" + CR
}
+
"#include \"vci_xicu.h\""
+
CR
+
"#include \"vci_mwmr_stats.h\""
+
CR
;
//DG 20.09.
else
{
if
(
with_vgsb
>
0
)
header
+=
"#include \"vci_vgmn.h\""
+
CR
;
{
}
header
+=
"#include \"vci_vgsb.h\""
+
CR
;
int
with_hw_accellerator
=
1
;
//DG 23.08. a la main
}
if
(
with_hw_accellerator
>
0
){
else
header
+=
"#include \"vci_mwmr_controller.h\""
+
CR
;
{
}
header
+=
"#include \"vci_vgmn.h\""
+
CR
;
//include statements for all coprocessors found
}
//The user must ensure that there is a SoCLib component corresponding to this coprocessor
int
with_hw_accellerator
=
1
;
//DG 23.08. a la main
// if (with_hw_accellerator>0){
if
(
with_hw_accellerator
>
0
)
//DG 23.08. actuellement il ne les trouve pas!
{
int
hwas
=
0
;
header
+=
"#include \"mwmr_controller.h\""
+
CR
;
//header +="#include \"fifo_virtual_copro_wrapper.h\""+ CR;
header
+=
"#include \"vci_mwmr_controller.h\""
+
CR
;
}
for
(
AvatarCoproMWMR
HWAccelerator
:
TopCellGenerator
.
avatardd
.
getAllCoproMWMR
())
{
//include statements for all coprocessors found
// String name = HWAccelerator.getCoprocName();
//The user must ensure that there is a SoCLib component corresponding to this coprocessor
// header +="#include \""+name+"\""+ CR;
// if (with_hw_accellerator>0){
//DG 23.08. actuellement il ne les trouve pas!
//Per default for testing
int
hwas
=
0
;
// header +="#include \"input_coproc.h\""+ CR;
header
+=
"#include \"fifo_virtual_copro_wrapper.h\""
+
CR
;
//header +="#include \"output_coproc.hh\""+ CR;
for
(
AvatarCoproMWMR
HWAccelerator:
TopCellGenerator
.
avatardd
.
/* can be found in /users/outil/soc/soclib/soclib/module/internal_component/fifo* */
getAllCoproMWMR
())
//header +="#include \"fifo_virtual_copro_wrapper.h\""+ CR;
{
header
+=
"#include \"my_hwa.h\""
+
CR
;
// String name = HWAccelerator.getCoprocName();
hwas
++;
// header +="#include \""+name+"\""+ CR;
}
if
(
hwas
>
0
)
//Per default for testing
header
+=
"#include \"fifo_virtual_copro_wrapper.h\""
+
CR
;
// header +="#include \"input_coproc.h\""+ CR;
// }
//header +="#include \"output_coproc.hh\""+ CR;
header
+=
"#include \"vci_block_device.h\""
+
CR
/* can be found in /users/outil/soc/soclib/soclib/module/internal_component/fifo* */
+
"#include \"vci_simhelper.h\""
+
CR
+
"#include \"vci_fd_access.h\""
+
CR
//header +="#include \"fifo_virtual_copro_wrapper.h\""+ CR;
+
"#include \"vci_ethernet.h\""
+
CR
if
(
HWAccelerator
.
getCoprocType
()
==
0
)
+
"#include \"vci_rttimer.h\""
+
CR
{
+
"#include \"vci_logger.h\""
+
CR
header
+=
"#include \"vci_input_engine.h\""
+
CR
;
+
"#include \"vci_local_crossbar.h\""
+
CR2
;
header
+=
"#include \"papr_slot.h\""
+
CR
;
header
+=
"#include \"generic_fifo.h\""
+
CR
;
header
=
header
+
"namespace {"
+
CR
header
+=
"#include \"network_io.h\""
+
CR
;
+
"std::vector<std::string> stringArray("
+
CR
+
" const char *first, ... )"
+
CR
+
"{"
+
CR
+
" std::vector<std::string> ret;"
+
CR
+
" va_list arg;"
+
CR
+
" va_start(arg, first);"
+
CR
+
" const char *s = first;"
+
CR
+
" while(s) {"
+
CR
+
" ret.push_back(std::string(s));"
+
CR
+
" s = va_arg(arg, const char *);"
+
CR
+
" };"
+
CR
+
" va_end(arg);"
+
CR
+
" return ret;"
+
CR
+
"}"
+
CR2
+
"std::vector<int> intArray("
+
CR
+
" const int length, ... )"
+
CR
+
"{"
+
CR
+
" int i;"
+
CR
+
" std::vector<int> ret;"
+
CR
+
" va_list arg;"
+
CR
+
" va_start(arg, length);"
+
CR2
+
" for (i=0; i<length; ++i) {"
+
CR
+
" ret.push_back(va_arg(arg, int));"
+
CR
+
" };"
+
CR
+
" va_end(arg);"
+
CR
+
" return ret;"
+
CR
+
"}"
+
CR
+
"}"
+
CR2
;
header
=
header
+
"using namespace soclib;"
+
CR
+
"using common::IntTab;"
+
CR
+
"using common::Segment;"
;
if
(
TopCellGenerator
.
avatardd
.
getNbClusters
()==
0
){
header
=
header
+
CR2
+
"static common::MappingTable maptab(32, IntTab(8), IntTab(8), 0xfff00000);"
;
}
}
else
{
else
header
=
header
+
CR2
+
"static common::MappingTable maptab(32, IntTab(8,4), IntTab(8,4), 0xfff00000);"
;
{
if
(
HWAccelerator
.
getCoprocType
()
==
1
)
{
header
+=
"#include \"vci_output_engine.h\""
+
CR
;
}
else
{
header
+=
"#include \"my_hwa.h\""
+
CR
;
hwas
++;
}
}
}
return
header
;
// }
}
}
header
+=
"#include \"vci_block_device.h\""
+
CR
+
"#include \"vci_simhelper.h\""
+
CR
+
"#include \"vci_fd_access.h\""
+
CR
+
"#include \"vci_ethernet.h\""
+
CR
+
"#include \"vci_rttimer.h\""
+
CR
+
"#include \"vci_logger.h\""
+
CR
+
"#include \"vci_local_crossbar.h\""
+
CR2
;
header
=
header
+
"namespace {"
+
CR
+
"std::vector<std::string> stringArray("
+
CR
+
" const char *first, ... )"
+
CR
+
"{"
+
CR
+
" std::vector<std::string> ret;"
+
CR
+
" va_list arg;"
+
CR
+
" va_start(arg, first);"
+
CR
+
" const char *s = first;"
+
CR
+
" while(s) {"
+
CR
+
" ret.push_back(std::string(s));"
+
CR
+
" s = va_arg(arg, const char *);"
+
CR
+
" };"
+
CR
+
" va_end(arg);"
+
CR
+
" return ret;"
+
CR
+
"}"
+
CR2
+
"std::vector<int> intArray("
+
CR
+
" const int length, ... )"
+
CR
+
"{"
+
CR
+
" int i;"
+
CR
+
" std::vector<int> ret;"
+
CR
+
" va_list arg;"
+
CR
+
" va_start(arg, length);"
+
CR2
+
" for (i=0; i<length; ++i) {"
+
CR
+
" ret.push_back(va_arg(arg, int));"
+
CR
+
" };"
+
CR
+
" va_end(arg);"
+
CR
+
" return ret;"
+
CR
+
"}"
+
CR
+
"}"
+
CR2
;
header
=
header
+
"using namespace soclib;"
+
CR
+
"using common::IntTab;"
+
CR
+
"using common::Segment;"
;
if
(
TopCellGenerator
.
avatardd
.
getNbClusters
()
==
0
)
{
header
=
header
+
CR2
+
"static common::MappingTable maptab(32, IntTab(8), IntTab(8), 0xfff00000);"
;
}
else
{
header
=
header
+
CR2
+
"static common::MappingTable maptab(32, IntTab(8,4), IntTab(8,4), 0xfff00000);"
;
}
return
header
;
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment