SILICON
Loading...
Searching...
No Matches
SILICON::yosys::detail Namespace Reference

Functions

Json directions (std::initializer_list< std::pair< std::string_view, std::string_view > > values)
const Bus & requireBus (const Component &component, const bool input, const std::size_t index)
Json unsignedParameters (const std::size_t aWidth, const std::size_t bWidth, const std::size_t yWidth)
void emitUnary (SerializationContext &context, const std::string_view suffix, const std::string_view type, const Json &input, const Json &output)
void emitBinary (SerializationContext &context, const std::string_view suffix, const std::string_view type, const Json &lhs, const Json &rhs, const Json &output)
void emitFineBinary (SerializationContext &context, const std::string_view suffix, const std::string_view type, const Json &lhs, const Json &rhs, const Json &output)
void emitGateFold (SerializationContext &context, const Component &component, const std::string_view operation, const bool invert)
void emitLogicalGateFold (SerializationContext &context, const Component &component, const std::string_view operation)

Function Documentation

◆ directions()

Json directions ( std::initializer_list< std::pair< std::string_view, std::string_view > > values)
inlinenodiscard

Definition at line 36 of file helpers.hpp.

◆ emitBinary()

void emitBinary ( SerializationContext & context,
const std::string_view suffix,
const std::string_view type,
const Json & lhs,
const Json & rhs,
const Json & output )
inline

Definition at line 78 of file helpers.hpp.

◆ emitFineBinary()

void emitFineBinary ( SerializationContext & context,
const std::string_view suffix,
const std::string_view type,
const Json & lhs,
const Json & rhs,
const Json & output )
inline

Definition at line 87 of file helpers.hpp.

◆ emitGateFold()

void emitGateFold ( SerializationContext & context,
const Component & component,
const std::string_view operation,
const bool invert )
inline

Yosys binary logic cells have two inputs. Silicon gates may have any number, so fold their inputs through temporary vectors and optionally invert the final value.

Definition at line 107 of file helpers.hpp.

◆ emitLogicalGateFold()

void emitLogicalGateFold ( SerializationContext & context,
const Component & component,
const std::string_view operation )
inline

Fold bus-valued operands through Yosys logical cells. Each operand is first interpreted by Verilog truth-value semantics, while every intermediate and the final result remain scalar.

Definition at line 160 of file helpers.hpp.

◆ emitUnary()

void emitUnary ( SerializationContext & context,
const std::string_view suffix,
const std::string_view type,
const Json & input,
const Json & output )
inline

Definition at line 67 of file helpers.hpp.

◆ requireBus()

const Bus & requireBus ( const Component & component,
const bool input,
const std::size_t index )
inlinenodiscard

Definition at line 44 of file helpers.hpp.

◆ unsignedParameters()

Json unsignedParameters ( const std::size_t aWidth,
const std::size_t bWidth,
const std::size_t yWidth )
inlinenodiscard

Definition at line 56 of file helpers.hpp.