Dennis cecb73f07a
Fundamental changes to the architecture of component classes
All components (e.g., fields, registers, addrmaps) are now children
of a common class Component. This common class has certain common
methods such as get_ports(), get_rtl(), or create_logger().

The AddrMap is now prepared to support alias registers by saving the
registers in a dictionary. That way, registers can easily be accessed
once an alias to a register is found. Furthermore, the addrmap template
is now also loaded from a YAML file. Lastly, the first preparements to
insert ports into the addrmap module are made.

For templates, the indents do not need to be added anymore to the
template. Now, a seperate method will automatically indent the RTL
based on simple rules (e.g., increment indent if `begin` is found).
The CLI also supports settings for the tabs (i.e., real tabs or spaces
and the tab width).

A lot of functionality from the __init__() method of the field class
got reorganized. More logic will be reorganized in the future.
2021-05-15 00:29:59 +02:00

50 lines
1.3 KiB
YAML

---
sense_list_rst: |-
always_ff @(posedge {clk_name} or {rst_edge} {rst_name})
sense_list_no_rst: |-
always_ff @(posedge {clk_name})
rst_field_assign: |-
if ({rst_negl}{rst_name})
begin
{path}_q{genvars} <= {rst_value};
end
else
sw_access_field: |-
if ({path}_sw_wr{genvars})
begin
sw_access_byte: |-
if (byte_enable[{i}])
begin
{path}_q{genvars}[{msb_field}-:{field_w}] <= sw_wr_bus[{msb_bus}-:{bus_w}];
end
hw_access_we_wel: |-
if ({negl}{path}_hw_wr{genvars})
hw_access_no_we_wel: |-
if (1) // we or wel property not set
hw_access_field: |-
begin
{path}_q{genvars} <= {path}_in{genvars};
end
end_field_ff: |-
end // of {path}'s always_ff
field_comment: |-
//-----------------FIELD SUMMARY-----------------
// name : {name} ({path_wo_field}[{msb}:{lsb}])
// access : hw = {hw_access} {hw_precedence}
// sw = {sw_access} {sw_precedence}
// reset : {rst_active} / {rst_type}
// flags : {misc_flags}
//-----------------------------------------------
combo_operation_comment: |-
// Combinational logic for {path}
assign_combo_operation: |-
assign {path}_{op_name}{genvars} = {op_verilog}{path}_q{genvars}
singlepulse: |-
begin
{path}{genvars} <= 0;
end