[lib] start developing clock arch data structure and I/O
This commit is contained in:
parent
f4e017f06c
commit
e7fc065032
|
@ -0,0 +1,36 @@
|
|||
cmake_minimum_required(VERSION 3.9)
|
||||
|
||||
project("libclkarchopenfpga")
|
||||
|
||||
file(GLOB_RECURSE EXEC_SOURCES test/*.cpp)
|
||||
file(GLOB_RECURSE LIB_SOURCES src/*.cpp)
|
||||
file(GLOB_RECURSE LIB_HEADERS src/*.h)
|
||||
files_to_dirs(LIB_HEADERS LIB_INCLUDE_DIRS)
|
||||
|
||||
#Remove test executable from library
|
||||
list(REMOVE_ITEM LIB_SOURCES ${EXEC_SOURCES})
|
||||
|
||||
#Create the library
|
||||
add_library(libclkarchopenfpga STATIC
|
||||
${LIB_HEADERS}
|
||||
${LIB_SOURCES})
|
||||
target_include_directories(libclkarchopenfpga PUBLIC ${LIB_INCLUDE_DIRS})
|
||||
set_target_properties(libclkarchopenfpga PROPERTIES PREFIX "") #Avoid extra 'lib' prefix
|
||||
|
||||
#Specify link-time dependancies
|
||||
target_link_libraries(libclkarchopenfpga
|
||||
libopenfpgautil
|
||||
libvtrutil
|
||||
libarchfpga
|
||||
libpugiutil)
|
||||
|
||||
#Create the test executable
|
||||
foreach(testsourcefile ${EXEC_SOURCES})
|
||||
# Use a simple string replace, to cut off .cpp.
|
||||
get_filename_component(testname ${testsourcefile} NAME_WE)
|
||||
add_executable(${testname} ${testsourcefile})
|
||||
# Make sure the library is linked to each test executable
|
||||
target_link_libraries(${testname} libclkarchopenfpga)
|
||||
endforeach(testsourcefile ${EXEC_SOURCES})
|
||||
|
||||
install(TARGETS libclkarchopenfpga DESTINATION bin)
|
|
@ -0,0 +1,19 @@
|
|||
<clock_networks>
|
||||
<clock_network name="example_network" num_clocks="8">
|
||||
<spine name="spine_lvl3" start_x="0" start_y="H/2" end_x="W/2" end_y="H/2">
|
||||
<switch_point tap="spine_lvl2" x="W/2" y="H/2"/>
|
||||
</spine>
|
||||
<spine name="spine_lvl2_upper" start_x="W/2" start_y="H/2" end_x="W/2" end_y="H*0.75">
|
||||
<switch_point tap="rib_lvl1_upper_left" x="W/2" y="H*0.75"/>
|
||||
<switch_point tap="rib_lvl1_upper_right" x="W/2" y="H*0.75"/>
|
||||
</spine>
|
||||
<spine name="spine_lvl2_lower" start_x="W/2" start_y="H/2" end_x="W/2" end_y="H*0.25">
|
||||
<switch_point tap="rib_lvl1_lower_left" x="W/2" y="H*0.25"/>
|
||||
<switch_point tap="rib_lvl1_lower_left" x="W/2" y="H*0.25"/>
|
||||
</spine>
|
||||
<spine name="rib_lvl1_upper_left" start_x="W/2" start_y="H*0.75" end_x="W/4" end_y="H*0.75"/>
|
||||
<spine name="rib_lvl1_upper_right" start_x="W/2" start_y="H*0.75" end_x="W*0.75" end_y="H*0.75"/>
|
||||
<spine name="rib_lvl1_lower_left" start_x="W/2" start_y="H*0.25" end_x="W/4" end_y="H*0.25"/>
|
||||
<spine name="rib_lvl1_lower_right" start_x="W/2" start_y="H*0.25" end_x="W*0.75" end_y="H*0.25"/>
|
||||
</clock_network>
|
||||
</clock_networks>
|
Loading…
Reference in New Issue