URL
https://opencores.org/ocsvn/i650/i650/trunk
[/] [i650/] [trunk/] [rtl/] [biq_9s_comp.v] - Blame information for rev 17
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
16 |
eightycc |
`timescale 1ns / 1ps
|
2 |
|
|
//////////////////////////////////////////////////////////////////////////////////
|
3 |
|
|
// IBM 650 Reconstruction in Verilog (i650)
|
4 |
|
|
//
|
5 |
|
|
// This file is part of the IBM 650 Reconstruction in Verilog (i650) project
|
6 |
|
|
// http:////www.opencores.org/project,i650
|
7 |
|
|
//
|
8 |
|
|
// Description: 9's complement of a bi-quinary number.
|
9 |
|
|
//
|
10 |
|
|
// Additional Comments:
|
11 |
|
|
//
|
12 |
|
|
// Copyright (c) 2015 Robert Abeles
|
13 |
|
|
//
|
14 |
|
|
// This source file is free software; you can redistribute it
|
15 |
|
|
// and/or modify it under the terms of the GNU Lesser General
|
16 |
|
|
// Public License as published by the Free Software Foundation;
|
17 |
|
|
// either version 2.1 of the License, or (at your option) any
|
18 |
|
|
// later version.
|
19 |
|
|
//
|
20 |
|
|
// This source is distributed in the hope that it will be
|
21 |
|
|
// useful, but WITHOUT ANY WARRANTY; without even the implied
|
22 |
|
|
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
23 |
|
|
// PURPOSE. See the GNU Lesser General Public License for more
|
24 |
|
|
// details.
|
25 |
|
|
//
|
26 |
|
|
// You should have received a copy of the GNU Lesser General
|
27 |
|
|
// Public License along with this source; if not, download it
|
28 |
|
|
// from http://www.opencores.org/lgpl.shtml
|
29 |
|
|
//////////////////////////////////////////////////////////////////////////////////
|
30 |
|
|
`include "defines.v"
|
31 |
|
|
|
32 |
|
|
module biq_9s_comp (
|
33 |
|
|
input [0:6] biq_in,
|
34 |
|
|
output [0:6] biq_out
|
35 |
|
|
);
|
36 |
|
|
|
37 |
17 |
eightycc |
//-----------------------------------------------------------------------------
|
38 |
|
|
// 9's complement swaps binary bits and reverses order of quinary bits.
|
39 |
|
|
//-----------------------------------------------------------------------------
|
40 |
|
|
assign biq_out = {biq_in[`biq_b0], biq_in[`biq_b5],
|
41 |
|
|
biq_in[`biq_q0], biq_in[`biq_q1],
|
42 |
|
|
biq_in[`biq_q2], biq_in[`biq_q3],
|
43 |
|
|
biq_in[`biq_q4]};
|
44 |
16 |
eightycc |
|
45 |
|
|
endmodule
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.