Skip to content

Commit

Permalink
FIX: elaboration script
Browse files Browse the repository at this point in the history
  • Loading branch information
T-K-233 committed Dec 17, 2024
1 parent a10943d commit 476b0eb
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions src/main/scala/Elaborate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ object GenerateBitstream extends App {
)


val chipyard_sources = new File("/home/tk/Downloads/ZedBoard-Workspace/chipyard/sims/verilator/generated-src/chipyard.harness.TestHarness.TinyRocketConfig/gen-collateral").listFiles(new FileFilter {
val chipyard_sources = new File("chipyard/sims/verilator/generated-src/chipyard.harness.TestHarness.TinyRocketConfig/gen-collateral").listFiles(new FileFilter {
def accept(file: File): Boolean = file.isFile || file.isDirectory
}).flatMap(file => if (file.isDirectory) file.listFiles().map(_.getAbsolutePath) else Array(file.getAbsolutePath))
// Exclude files listed in excluded_sources
Expand Down Expand Up @@ -141,24 +141,26 @@ object GenerateBitstream extends App {
// CONFIG.MMCM_CLKFBOUT_MULT_F {8.500} \
// CONFIG.MMCM_CLKOUT0_DIVIDE_F {42.500} \
// ] [get_ips clk_wiz_0]""")
run_tcl.println("""
set_property -dict [list \
CONFIG.CLKOUT1_JITTER {125.247} \
CONFIG.CLKOUT1_PHASE_ERROR {98.575} \
CONFIG.CLKOUT1_REQUESTED_OUT_FREQ {50} \
CONFIG.CLKOUT2_JITTER {175.402} \
CONFIG.CLKOUT2_PHASE_ERROR {98.575} \
CONFIG.CLKOUT2_REQUESTED_OUT_FREQ {25} \
CONFIG.CLKOUT2_USED {true} \
CONFIG.MMCM_CLKFBOUT_MULT_F {10.000} \
CONFIG.MMCM_CLKOUT0_DIVIDE_F {8.000} \
CONFIG.MMCM_CLKOUT1_DIVIDE {40} \
CONFIG.NUM_OUT_CLKS {2} \
run_tcl.println(s"""
set_property -dict [list \\
CONFIG.CLKOUT1_JITTER {125.247} \\
CONFIG.CLKOUT1_PHASE_ERROR {98.575} \\
CONFIG.CLKOUT1_REQUESTED_OUT_FREQ {50} \\
CONFIG.CLKOUT2_JITTER {175.402} \\
CONFIG.CLKOUT2_PHASE_ERROR {98.575} \\
CONFIG.CLKOUT2_REQUESTED_OUT_FREQ {25} \\
CONFIG.CLKOUT2_USED {true} \\
CONFIG.MMCM_CLKFBOUT_MULT_F {10.000} \\
CONFIG.MMCM_CLKOUT0_DIVIDE_F {8.000} \\
CONFIG.MMCM_CLKOUT1_DIVIDE {40} \\
CONFIG.NUM_OUT_CLKS {2} \\
] [get_ips ${ip_name}]""")


run_tcl.println(s"generate_target {instantiation_template} [get_ips ${ip_name}]")
run_tcl.println("update_compile_order -fileset sources_1")
run_tcl.println(s"generate_target all [get_ips ${ip_name}]")
run_tcl.println(s"catch { config_ip_cache -export [get_ips -all ${ip_name}] }")
run_tcl.println(s"export_ip_user_files -of_objects [get_ips ${ip_name}] -no_script -sync -force -quiet")
run_tcl.println(s"create_ip_run [get_ips ${ip_name}]")
}
Expand All @@ -168,15 +170,17 @@ object GenerateBitstream extends App {

run_tcl.println(s"create_ip -name axis_data_fifo -vendor xilinx.com -library ip -version 2.0 -module_name ${ip_name}")

run_tcl.println("""
set_property -dict [list \
CONFIG.HAS_TLAST {1} \
CONFIG.TUSER_WIDTH {1 } \
] [get_ips axis_data_fifo_0]
run_tcl.println(s"""
set_property -dict [list \\
CONFIG.HAS_TLAST {1} \\
CONFIG.TUSER_WIDTH {1} \\
] [get_ips ${ip_name}]
""")

run_tcl.println(s"generate_target {instantiation_template} [get_ips ${ip_name}]")
run_tcl.println("update_compile_order -fileset sources_1")
run_tcl.println(s"generate_target all [get_ips ${ip_name}]")
run_tcl.println(s"catch { config_ip_cache -export [get_ips -all ${ip_name}] }")
run_tcl.println(s"export_ip_user_files -of_objects [get_ips ${ip_name}] -no_script -sync -force -quiet")
run_tcl.println(s"create_ip_run [get_ips ${ip_name}]")

Expand Down

0 comments on commit 476b0eb

Please sign in to comment.