|
技术交流 | 电路欣赏 | 工控天地 | 数字广电 | 通信技术 | 电源技术 | 测控之家 | EMC技术 | ARM技术 | EDA技术 | PCB技术 | 嵌入式系统 驱动编程 | 集成电路 | 器件替换 | 模拟技术 | 新手园地 | 单 片 机 | DSP技术 | MCU技术 | IC 设计 | IC 产业 | CAN-bus/DeviceNe |
帮我看看这个程序是什么语言写的? |
作者:ivorguo 栏目:EDA技术 |
NAME Adder; PARTNO CA0016; Date 10/08/85; Rev 01; Designer Woolhiser; Company Assisted TECHNOLOGY; Assembly None; Location None; DEVICE G16V8; /****************************************************************/ /* */ /* Four bit adder using the CUPL function statement. */ /* */ /* 4-bit asynchronous adder implemented as a ripple-carry */ /* through four adder-slice CIRCUITs. Each adder-slice */ /* takes a pair of 1-bit NUMBERs (Xi, Yi) and the carry from */ /* a previous slice (Cin) and produces their 1-bit sum (Zi) */ /* and carry (Cout). Each adder-slice CIRCUIT is defined */ /* using the CUPL function adder_slice(), which returns */ /* the PRODUCT directly and the carry as Cout. */ /****************************************************************/ /** Inputs **/ Pin [1..4] = [X1..4]; /* First 4-bit NUMBER */ Pin [5..8] = [Y1..4]; /* Second 4-bit NUMBER */ /** Outputs **/ Pin [12..15] = [Z1..4]; /* 4-bit sum */ Pin [16..18] = [C1..3]; /* Intermediate carry vaules */ Pin 19 = Carry; /* Carry for 4-bit sum */ /* Adder-slice CIRCUIT - add 2, 1-bit, NUMBERs with carry */ function adder_slice(X, Y, Cin, Cout) { Cout = Cin & X /* Compute carry */ # Cin & Y # X & Y; adder_slice = Cin $ (X $ Y); /* Compute sum */ } /* Perform 4, 1-bit, additions and KEEP the final carry */ Z1 = adder_slice(X1, Y1, 'h'0, C1); /* Initial carry = 'h'0 */ Z2 = adder_slice(X2, Y2, C1, C2); Z3 = adder_slice(X3, Y3, C2, C3); Z4 = adder_slice(X4, Y4, C3, Carry); /* Get final carry VALUE */ |
2楼: | >>参与讨论 |
作者: whjwhjwhj 于 2005/6/30 13:33:00 发布:
细心点 白痴: 一有问题就问人,看下面这句话,在你程序的前面。 Four bit adder using the CUPL function statement. |
3楼: | >>参与讨论 |
作者: whjwhjwhj 于 2005/6/30 13:44:00 发布:
你就不知道从网上找找,就知道发帖子,不劳而或 赌东道 |
4楼: | >>参与讨论 |
作者: wsjc1999 于 2005/7/14 23:15:00 发布:
Protel 99SE 自带的 |
|
|
免费注册为维库电子开发网会员,参与电子工程师社区讨论,点此进入 |
Copyright © 1998-2006 www.dzsc.com 浙ICP证030469号 |