Skip to content

Commit

Permalink
updated examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Randy1005 committed Sep 8, 2023
1 parent 4fab70f commit 2cda20f
Show file tree
Hide file tree
Showing 65 changed files with 10,402,746 additions and 62 deletions.
11 changes: 4 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ compile_commands.json
CTestTestfile.cmake
_deps
*.cmake
*.tcl

# build folder
[Bb]uild/
Expand All @@ -21,10 +22,9 @@ _deps
[Bb]uild-debug/*
[Bb]uild-debug*

# regression
[Rr]egressions/*
[Rr]egressions/**
[Rr]egressions/
# experiment
[Ee]xperiment/
[Ee]xperiment/*

# swp files
*.swp
Expand All @@ -41,6 +41,3 @@ vgcore*
# benchmarks
[Bb]enchmarks/
[Bb]enchmarks/*

# *_timing executables
*_timing
30 changes: 16 additions & 14 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,26 @@
# add_executable(vga_lcd_timing ${INK_EXAMPLE_DIR}/vga_lcd/vga_lcd.cpp)

# example: tv80.cpp
# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${INK_EXAMPLE_DIR}/tv80)
# add_executable(tv80_timing ${INK_EXAMPLE_DIR}/tv80/tv80.cpp)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${INK_EXAMPLE_DIR}/tv80)
add_executable(tv80_example ${INK_EXAMPLE_DIR}/tv80/tv80.cpp)

# example: c7552.cpp
# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${INK_EXAMPLE_DIR}/c7552)
# add_executable(c7552_timing ${INK_EXAMPLE_DIR}/c7552/c7552.cpp)
# example: wb_dma.cpp
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${INK_EXAMPLE_DIR}/wb_dma)
add_executable(wb_dma_example ${INK_EXAMPLE_DIR}/wb_dma/wb_dma.cpp)

# example: c17.cpp
# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${INK_EXAMPLE_DIR}/c17)
# add_executable(c17_timing ${INK_EXAMPLE_DIR}/c17/c17.cpp)
# example: des_perf.cpp
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${INK_EXAMPLE_DIR}/des_perf)
add_executable(des_perf_example ${INK_EXAMPLE_DIR}/des_perf/des_perf.cpp)

# example: des_perf.cpp
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${INK_EXAMPLE_DIR}/aes_core)
add_executable(aes_core_example ${INK_EXAMPLE_DIR}/aes_core/aes_core.cpp)

list(APPEND INK_EXAMPLES
# simple_timing
# c432_timing
# vga_lcd_timing
# tv80_timing
# c7552_timing
# c17_timing
tv80_example
wb_dma_example
des_perf_example
aes_core_example
)

find_package(Threads REQUIRED)
Expand Down
30 changes: 30 additions & 0 deletions examples/aes_core/aes_core.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include <ot/timer/timer.hpp>

int main(int argc, char *argv[]) {

// create a timer object
ot::Timer timer;

// Read design
timer.read_celllib("aes_core_Early.lib", ot::MIN)
.read_celllib("aes_core_Late.lib", ot::MAX)
.read_verilog("aes_core.v")
.read_spef("aes_core.spef");

// get the top-5 worst critical paths
auto paths = timer.report_timing(10);

for(size_t i=0; i<paths.size(); ++i) {
std::cout << "----- Critical Path " << i << " -----\n";
std::cout << paths[i] << '\n';
}


std::ofstream ofs("aes_core.edges");
timer.dump_edge_insertions(ofs);

return 0;
}



43,022 changes: 43,022 additions & 0 deletions examples/aes_core/aes_core.edges

Large diffs are not rendered by default.

Loading

0 comments on commit 2cda20f

Please sign in to comment.