16 return ERR(
"netlist is a nullptr");
21 return ERR(
"no gate types specified");
26 return ERR(
"no control pin types specified");
30 double total_time = 0;
31 auto begin_time = std::chrono::high_resolution_clock::now();
35 proc_config.
num_threads = std::thread::hardware_concurrency();
50 std::shared_ptr<dataflow::Grouping> initial_grouping =
nullptr;
52 std::shared_ptr<dataflow::Grouping> final_grouping =
nullptr;
57 log_info(
"dataflow",
"iteration {}", iteration);
64 if (eval_result.is_final_result)
66 log_info(
"dataflow",
"got final result");
67 final_grouping = eval_result.merged_result;
71 initial_grouping = eval_result.merged_result;
78 total_time = (double)std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - begin_time).count() / 1000;
80 log_info(
"dataflow",
"dataflow processing finished in {:3.2f}s", total_time);
Result of a dataflow analysis run.
This file contains the function that analyses the dataflow of a gate-level netlist.
#define log_info(channel,...)
evaluation::Result run(const Configuration &config, Context &ctx, const std::shared_ptr< Grouping > &initial_grouping, const processing::Result &result)
NetlistAbstraction run(const dataflow::Configuration &config, std::shared_ptr< dataflow::Grouping > &initial_grouping)
processing::Result run(const processing::Configuration &config, const std::shared_ptr< Grouping > &initial_grouping)
hal::Result< dataflow::Result > analyze(const Configuration &config)
Analyze the gate-level netlist to identify word-level structures such as registers.
CORE_API std::string join(const std::string &joiner, const Iterator &begin, const Iterator &end, const Transform &transform)
Configuration of a dataflow analysis run.
std::vector< std::vector< Net * > > known_net_groups
Groups of nets that have been identified as word-level datapathes beforehand. Defaults to an empty ve...
std::vector< u32 > expected_sizes
Expected group sizes. Groups of these sizes will be prioritized. Defaults to an empty vector.
std::set< const GateType * > gate_types
The gate types to be grouped by dataflow analysis. Defaults to an empty set.
std::set< PinType > control_pin_types
The pin types of the pins to be considered control pins. Defaults to an empty set.
bool enforce_type_consistency
Enforce gate type consistency inside of a group. Defaults to false.
u32 min_group_size
Minimum size of a group. Smaller groups will be penalized during analysis. Defaults to 8.
Netlist * netlist
The netlist to be analyzed.
std::vector< u32 > prioritized_sizes
bool enforce_type_consistency