当前位置: > Error (10170):Verilog HDL syntax error at Verilog1.v(2) near text "74138"; expecting an identifier...
题目
Error (10170):Verilog HDL syntax error at Verilog1.v(2) near text "74138"; expecting an identifier
/*TTL module 74138*/
module 74138(Y,A,G1,G2);
output[7:0]Y;
input[2:0]A;
input G1,G2;
reg[7:0]Y:
wire G;
assign G=G1&~G2;
always@(A or G1 or G2);
begin
if(G)
case(A)
3'd0:Y=8'b11111110;
3'd1:Y=8'b11111101;
3'd2:Y=8'b11111011;
3'd3:Y=8'b11110111;
3'd4:Y=8'b11101111;
3'd5:Y=8'b11011111;
3'd6:Y=8'b10111111;
3'd7:Y=8'b01111111;
endcase
else
Y=8'b11111111;
end
endmodule
module exam3(D8,D7,D6,K8,K7,K6);
output D8,D7,D6;
input k8,k7,k6;
wire[7:0]Y;
wire[2:0]A;
wire VCC,GND;
assign A[2]=K8;
assign A[1]=K7;
assign A[0]=K6;
assign VCC=1;
assign GND=0;
//module 138(Y,A,G1,G2);
74138u1(.Y(Y),.A(A),.G1(VCC),.G2(GND));
nand u2(D8,Y[6],Y[5],Y[4],Y[3]);
nand u3(D7,Y[3],Y[3],Y[1]);
nand u4(D6,Y[5],Y[3],Y[2]);
endmodule

提问时间:2021-01-02

答案
/*TTL module 74138*/module a74138(Y,A,G1,G2);output[7:0]Y;input[2:0]A;input G1,G2;reg[7:0]Y;wire G;assign G=G1&~G2;always@(A or G1 or G2)begin\x05\x05if(G)\x05\x05case(A)3'd0:Y=8'b11111110;3'd1:Y=8'b1...
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
版权所有 CopyRight © 2012-2019 超级试练试题库 All Rights Reserved.