Skip to content

Commit

Permalink
Fixed Rx termination. (#36)
Browse files Browse the repository at this point in the history
* Fixed Rx termination.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: David Banas <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 12, 2024
1 parent 8a93ae6 commit 8499585
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
10 changes: 5 additions & 5 deletions src/pyibisami/ami/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
import em

param_types = {
"INT": {"c_type": "int", "ami_type": "Integer", "getter": "get_param_int"},
"FLOAT": {"c_type": "float", "ami_type": "Float", "getter": "get_param_float"},
"TAP": {"c_type": "float", "ami_type": "Tap", "getter": "get_param_float"},
"BOOL": {"c_type": "bool", "ami_type": "Boolean", "getter": "get_param_bool"},
"STRING": {"c_type": "char *", "ami_type": "String", "getter": "get_param_str"},
"INT": {"c_type": "int", "ami_type": "Integer", "getter": "get_param_int"},
"FLOAT": {"c_type": "float", "ami_type": "Float", "getter": "get_param_float"},
"TAP": {"c_type": "float", "ami_type": "Tap", "getter": "get_param_float"},
"BOOL": {"c_type": "bool", "ami_type": "Boolean", "getter": "get_param_bool"},
"STRING": {"c_type": "char *", "ami_type": "String", "getter": "get_param_str"},
}


Expand Down
20 changes: 9 additions & 11 deletions src/pyibisami/ami/generic.ibs.em
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[IBIS Ver] 7.1

@{
from numpy import array

version = ibis_params['version']
file_name = ibis_params['file_name']
file_rev = ibis_params['file_rev']
copyright = ibis_params['copyright']
source = ibis_params['source']
component = ibis_params['component']
manufacturer = ibis_params['manufacturer']
r_pkg = ibis_params['r_pkg']
Expand All @@ -24,12 +24,13 @@ impedance = ibis_params['impedance']
slew_rate = ibis_params['slew_rate']
}

[IBIS Ver] @(version)
[File Name] @(file_name)
[File Rev] @(file_rev)

[Date] @(date)

[Source] ibisami, a public domain IBIS-AMI model creation infrastructure
[Source] @(source)

[Disclaimer]
THIS MODEL IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Expand All @@ -44,11 +45,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS MODEL, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

[Notes]
This IBIS file was generated, using the template file,
"example_tx.ibs.em", from ibisami, a public domain IBIS-AMI model
creation infrastructure. To learn more, visit:

https://github.com/capn-freako/ibisami/wiki
This IBIS file was generated using the template file: "generic.ibs.em".

[Copyright] @(copyright)
[Component] @(component)
Expand Down Expand Up @@ -128,13 +125,14 @@ else:
print("[GND Clamp]")
print("%-5.2f %-10.3e %-10.3e %-10.3e" % (-1. * voltage_range[0], -10., -10., -10.))
for v in [k * voltage_range[0] for k in range(3)]:
i = v / array(impedance)
i = v / array(impedance) / 2
print("%-5.2f %-10.3e %-10.3e %-10.3e" % (v, i[0], i[1], i[2]))
print("")
print("[Power Clamp]")
print("%-5.2f %-10.3e %-10.3e %-10.3e" % (-1. * voltage_range[0], 10., 10., 10.))
print("%-5.2f %-10.3e %-10.3e %-10.3e" % (0., 0., 0., 0.))
print("%-5.2f %-10.3e %-10.3e %-10.3e" % (2. * voltage_range[0], 0., 0., 0.))
for v in [k * voltage_range[0] for k in range(3)]:
i = v / array(impedance) / 2
print("%-5.2f %-10.3e %-10.3e %-10.3e" % (v, -i[0], -i[1], -i[2]))
print("")
}

Expand Down

0 comments on commit 8499585

Please sign in to comment.