forked from ms3273/ece4750-S01-pymtl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRegIncrRTL.py
26 lines (19 loc) · 816 Bytes
/
RegIncrRTL.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#=======================================================================
# RegIncrRTL.py
#=======================================================================
# RTL model of a registered incrementer.
from pymtl import *
class RegIncrRTL( Model ):
def __init__( s, dtype ):
s.in_ = InPort ( dtype )
s.out = OutPort( dtype )
#-------------------------------------------------------------------
# TASK 2.3: Comment out the Exception below.
# Implement RegIncr code shown on the overhead slides.
#-------------------------------------------------------------------
raise NotImplementedError(
'RegIncrRTL has not been implemented yet!\n '
'Put your implementation code here!'
)
def line_trace( s ):
return '{} ({}) {}'.format( s.in_, s.tmp, s.out )