목차
adder.v.txt
control.v.txt
counter.v.txt
mul.v.txt
regi.v.txt
tb.v.txt
Multiplier.pptx……………………………7p
4비트 멀티플라이어의 대략적 설명
부분별로 설명및 시뮬레이션 결과
-accumulator
-control
-adder
-counter
최종결과
control.v.txt
counter.v.txt
mul.v.txt
regi.v.txt
tb.v.txt
Multiplier.pptx……………………………7p
4비트 멀티플라이어의 대략적 설명
부분별로 설명및 시뮬레이션 결과
-accumulator
-control
-adder
-counter
최종결과
본문내용
Multiplier
≪ 그 림 ≫
accumulator
Load가 1일땐 출력값에 Multiplier를 넣음
Sh가 1일땐 출력값을 오른쪽으로 shift
Add일땐 adder값을 출력값 8~4bit 부분에 넣는다.
맨 뒷 비트는 다음 클락에서 더할지 말지를 선택하게 해준다.
≪ 그 림 ≫ ≪ 그 림 ≫
Control
K ,M , 그리고 st에 따라
control signal을 내보낸다.
Load후 Shift가 3번이 되면
K가 1이되고 그 뒤에 M이 0이면
없다면 s3로 M이 1이면 s2를 거쳐
S3가 된다.
그 뒤 st가 1이면 s4에서
계속 머물러있어
다음 곱셈을 할 수가 없다.
≪ 그 림 ≫
≪ 그 림 ≫
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
control.v
module control (input st,
input K,
input M,
input clk,
input rst,
output reg Sh,
output reg add,
output reg load,
output reg Done);
reg [2:0] s;
initial s=000;
always @ (posedge clk)
begin
case(rst)
1'b1 :begin
s=000;
Sh=0;
add=0;
load=0;
Done=0;
end
≪ 그 림 ≫
accumulator
Load가 1일땐 출력값에 Multiplier를 넣음
Sh가 1일땐 출력값을 오른쪽으로 shift
Add일땐 adder값을 출력값 8~4bit 부분에 넣는다.
맨 뒷 비트는 다음 클락에서 더할지 말지를 선택하게 해준다.
≪ 그 림 ≫ ≪ 그 림 ≫
Control
K ,M , 그리고 st에 따라
control signal을 내보낸다.
Load후 Shift가 3번이 되면
K가 1이되고 그 뒤에 M이 0이면
없다면 s3로 M이 1이면 s2를 거쳐
S3가 된다.
그 뒤 st가 1이면 s4에서
계속 머물러있어
다음 곱셈을 할 수가 없다.
≪ 그 림 ≫
≪ 그 림 ≫
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
control.v
module control (input st,
input K,
input M,
input clk,
input rst,
output reg Sh,
output reg add,
output reg load,
output reg Done);
reg [2:0] s;
initial s=000;
always @ (posedge clk)
begin
case(rst)
1'b1 :begin
s=000;
Sh=0;
add=0;
load=0;
Done=0;
end
소개글