OpenCores
URL https://opencores.org/ocsvn/pid_controller/pid_controller/trunk

Subversion Repositories pid_controller

[/] [pid_controller/] [trunk/] [RTL/] [booth.v] - Blame information for rev 12

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 m99
/*Booth Encoder
2
Author: Zhu Xu
3
Email: m99a1@yahoo.cn
4
*/
5
module booth_radix4(
6
input   [2:0]codes,
7
output  zero,
8
output  double,
9
output  negation
10
);
11
 
12
wire    A;
13
assign  A=codes[2];
14
wire    B;
15
assign  B=codes[1];
16
wire    C;
17
assign  C=codes[0];
18
wire    nB,nC,nA;
19
assign  nB=~B;
20
assign  nC=~C;
21
assign  nA=~A;
22
 
23
wire    BC;
24
assign  BC=B&C;
25
wire    nBnC;
26
assign  nBnC=nB&nC;
27
wire    nBanC;
28
assign  nBanC=nB|nC;
29
 
30
assign  double=(nBnC&A)|(BC&nA);
31
assign  negation=A&nBanC;
32
assign  zero=(A&BC)|(nA&nBnC);
33
 
34
 
35
 
36
 
37
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.