Commit e5b352e6 authored by Laura Alexandra Sequeira Gouveia's avatar Laura Alexandra Sequeira Gouveia
Browse files

Include templating for C functions as HW functions.

parent 2dcafff4
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
@@-- @_Required_@ : Required interfaces (from ri.tmplt) @@-- @_Required_@ : Required interfaces (from ri.tmplt)
@@-- @_Property_Names_@ : List of User-defined properties (names) @@-- @_Property_Names_@ : List of User-defined properties (names)
@@-- @_Property_Values_@ |_ Vector Tag: List of User-defined properties (values) @@-- @_Property_Values_@ |_ Vector Tag: List of User-defined properties (values)
@@IF@@ @_LOWER:Language_@ = simulink @@IF@@ @_LOWER:Language_@ = simulink or @_LOWER:Language_@ = c
@@TABLE@@ @@TABLE@@
@@IF@@ @_LOWER:Property_Names_@ = taste_iv_properties::fpga_configurations and not @_IS_EMPTY:LOWER:Property_Values_@ @@IF@@ @_LOWER:Property_Names_@ = taste_iv_properties::fpga_configurations and not @_IS_EMPTY:LOWER:Property_Values_@
project @_CAPITALIZE:Name_@_Zynq_Bambu is project @_CAPITALIZE:Name_@_Zynq_Bambu is
...@@ -22,11 +22,6 @@ project @_CAPITALIZE:Name_@_Zynq_Bambu is ...@@ -22,11 +22,6 @@ project @_CAPITALIZE:Name_@_Zynq_Bambu is
for Exec_Dir use "../../binaries"; for Exec_Dir use "../../binaries";
for Languages use ("FPGA"); for Languages use ("FPGA");
-- for Main use (
-- "@_STRIP:Unprotected_PIs_@.c"
--);
package Compiler is package Compiler is
Common_Bambu_Switches := Common_Bambu_Switches :=
("--compiler=I386_CLANG4", ("--compiler=I386_CLANG4",
...@@ -43,15 +38,16 @@ project @_CAPITALIZE:Name_@_Zynq_Bambu is ...@@ -43,15 +38,16 @@ project @_CAPITALIZE:Name_@_Zynq_Bambu is
"--panda-parameter=none-registered-ptrdefault=1", "--panda-parameter=none-registered-ptrdefault=1",
"-I../../../dataview/C"); "-I../../../dataview/C");
for Switches ("@_STRIP:Unprotected_PIs_@.c") use Common_Bambu_Switches & for Switches ("FPGA") use Common_Bambu_Switches &
("-I../../../@_LOWER:Name_@/SIMULINK/src", ("-I../../../@_LOWER:Name_@/@_Language_@/src",
"-I../../../@_LOWER:Name_@/SIMULINK/wrappers", "-I../../../@_LOWER:Name_@/@_Language_@/wrappers",
"--clock-name=clock_@_STRIP:Unprotected_PIs_@", "--clock-name=clock_@_STRIP:Unprotected_PIs_@",
"--reset-name=reset_@_STRIP:Unprotected_PIs_@", "--reset-name=reset_@_STRIP:Unprotected_PIs_@",
"--start-name=start_@_STRIP:Unprotected_PIs_@", "--start-name=start_@_STRIP:Unprotected_PIs_@",
"--done-name=finish_@_STRIP:Unprotected_PIs_@", "--done-name=finish_@_STRIP:Unprotected_PIs_@",
"--top-fname=bambu_@_STRIP:Unprotected_PIs_@", "--top-fname=bambu_@_STRIP:Unprotected_PIs_@",
"../../../@_LOWER:Name_@/SIMULINK/wrappers/@_STRIP:Unprotected_PIs_@_bambu.c"); "../../../@_LOWER:Name_@/@_Language_@/wrappers/@_STRIP:Unprotected_PIs_@_bambu.c");
case Build is case Build is
when "Release" => when "Release" =>
...@@ -63,19 +59,18 @@ project @_CAPITALIZE:Name_@_Zynq_Bambu is ...@@ -63,19 +59,18 @@ project @_CAPITALIZE:Name_@_Zynq_Bambu is
end case; end case;
end Compiler; end Compiler;
package Builder is -- following to be updated with all relevant source dirs
for Executable_Suffix use ".bit";
for Executable ("@_STRIP:Unprotected_PIs_@.c") use "@_Name_@_bambu";
end Builder;
-- following to be updated with all relevant source dirs
for Source_Dirs use for Source_Dirs use
( (
"../../@_LOWER:Name_@/SIMULINK/src" "../../@_LOWER:Name_@/@_Language_@/src"
); );
for Excluded_Source_Files use for Excluded_Source_Files use
("ert_main.c"); (
@@IF@@ @_LOWER:Language_@ = simulink
"ert_main.c"
@@END_IF@@
);
end @_CAPITALIZE:Name_@_Zynq_Bambu; end @_CAPITALIZE:Name_@_Zynq_Bambu;
......
...@@ -7,4 +7,4 @@ ...@@ -7,4 +7,4 @@
@@-- @_Param_Names_@ : List of parameter names @@-- @_Param_Names_@ : List of parameter names
@@-- @_Param_Types_@ : |_ Corresponding parameter types @@-- @_Param_Types_@ : |_ Corresponding parameter types
@@-- @_Param_Directions_@ : |_ Corresponding direction @@-- @_Param_Directions_@ : |_ Corresponding direction
@_STRIP:LOWER:Name_@ @_STRIP:Name_@
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
@@-- @_Required_@ : Required interfaces (from ri.tmplt) @@-- @_Required_@ : Required interfaces (from ri.tmplt)
@@-- @_Property_Names_@ : Required interfaces (from ri.tmplt) @@-- @_Property_Names_@ : Required interfaces (from ri.tmplt)
@@-- @_Property_Values_@ : Required interfaces (from ri.tmplt) @@-- @_Property_Values_@ : Required interfaces (from ri.tmplt)
@@IF@@ @_LOWER:Language_@ = simulink @@IF@@ @_LOWER:Language_@ = simulink or @_LOWER:Language_@ = c
@@TABLE@@ @@TABLE@@
@@IF@@ @_LOWER:Property_Names_@ = taste_iv_properties::fpga_configurations and @_LOWER:Property_Values_@ /= "" @@IF@@ @_LOWER:Property_Names_@ = taste_iv_properties::fpga_configurations and @_LOWER:Property_Values_@ /= ""
"@_STRIP:Unprotected_PIs_@_bambu.c", "@_STRIP:Unprotected_PIs_@_bambu.c",
......
...@@ -7,4 +7,4 @@ ...@@ -7,4 +7,4 @@
@@-- @_Param_Names_@ : List of parameter names @@-- @_Param_Names_@ : List of parameter names
@@-- @_Param_Types_@ : |_ Corresponding parameter types @@-- @_Param_Types_@ : |_ Corresponding parameter types
@@-- @_Param_Directions_@ : |_ Corresponding direction @@-- @_Param_Directions_@ : |_ Corresponding direction
@_LOWER:Name_@ @_Name_@
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment