Skip to content

Commit

Permalink
Minor changes to interrupt logic template
Browse files Browse the repository at this point in the history
  • Loading branch information
jvanstraten committed Aug 21, 2019
1 parent 117a83c commit d3f5042
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
12 changes: 6 additions & 6 deletions vhdmmio/vhdl/behavior/interrupt-read.template.vhd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@ Read mode: $cfg.bus_read$.
$r_data$ := $v$;
$if cfg.bus_read == 'clear'
$v$ := '0';
$endif
r_ack := true;
|@ Read mode: read $'and clear %s' % cfg.mode if cfg.bus_read == 'clear' else cfg.mode$.
|$r_data$ := $v$;
|$if cfg.bus_read == 'clear'
|$v$ := '0';
|$endif
|r_ack := true;
24 changes: 13 additions & 11 deletions vhdmmio/vhdl/behavior/interrupt-write.template.vhd
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
@ Write mode: $cfg.bus_write$.
$if cfg.bus_write == 'enabled'
$v$ := ($v$ and not $w_strobe$) or $w_data$;
$endif
$if cfg.bus_write == 'clear'
$v$ := $v$ and not $w_data$;
$endif
$if cfg.bus_write == 'set'
$v$ := $v$ or $w_data$;
$endif
w_ack := true;
|$if cfg.bus_write == 'enabled'
|@ Write mode: set $cfg.mode$.
|$v$ := ($v$ and not $w_strobe$) or $w_data$;
|$endif
|$if cfg.bus_write == 'clear'
|@ Write mode: bit-clear $cfg.mode$.
|$v$ := $v$ and not $w_data$;
|$endif
|$if cfg.bus_write == 'set'
|@ Write mode: bit-set $cfg.mode$.
|$v$ := $v$ or $w_data$;
|$endif
|w_ack := true;

0 comments on commit d3f5042

Please # to comment.