BLIF(Berkeley Logic Interchange Format )介绍

BLIF的目标是用文本的形式描述一个逻辑层级电路
一个电路是由逻辑方程组成的网络(包括组合逻辑和时序逻辑)
电路可以看作是由组合逻辑节点和时序逻辑元件组成的有向图
每个节点包含一个单一输出的逻辑方程

  1. 标题模型的声明
.model <decl-model-name>
.inputs <decl-input-list>
.outputs <decl-output-list>
.clock <decl-clock-list>
<command> 
...
<command>
.end

<decl-model-name>是指模型名,<decl-input-list><decl-output-list>定义输入信号,以空格分开多个,以换行符结束,<decl-clock-list>是指可选的时钟信号

  1. 逻辑门的声明
.names <in-1> <in-2> ... <in-n> <output>
<single-output-cover>

<output>指明已定义的逻辑门的输出信号, <in-k>指明已定义的输入信号
<single-output-cover> 定义一行PLA description, 输入信号的定义域为{0, 1, -},输出信号的定义域为{0,1}

example:

.names v3 v6 j u78 v13.15
1--0 1
-1-1 1
0-11 1

在一行<single-output-cover>中,'1’表示该输入信号,‘0’表示该输入信号的非,’-'表示没用到该输入信号,每一行中的所有输入信号用and连接,再使用or连接所有行的输入

如下语句将某个逻辑门j赋予常值’1’

.names j
1
  1. latch声明
.latch <input> <output> [<type> <control>] [<init-val>]

example:

.inputs in 
.outputs out
.latch out in 0
.names in out
0 1
.end

一个subcircuit将一个模型插入到另一个模型
example:

.model 4bitadder
.input A3 A2 A1 A0 B3 B2 B1 B0 CIN
.outputs COUT S3 S2 S1 S0
.subckt fulladder a=A0 b=B0 cin=CIN    s=S0 cout=CARRY1
.subckt fulladder a=A3 b=B3 cin=CARRY3 s=S3 cout=COUT
.subckt fulladder b=B1 a=A1 cin=CARRY1 s=XX cout=CARRY2
.subckt fulladder a=JJ b=B2 cin=CARRY2 s=S2 cout=CARRY3

.names XX S1  # formal output 's' does not fanout to a primary output
1 1
.names A2 JJ  # formal input 'a' does not fanin from a primary input
1 1
.end

.model fulladder
.inputs a b cin
.outputs s cout
.names a b k
10 1
01 1
.names k cin s
10 1
01 1
.names a b cin cout
11- 1
1-1 1
-11 1
.end
  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值