Skip to content

Commit 34e4d74

Browse files
author
隆曦
committed
目前成果:编码全部完成;解码手动搭建了N4的,还差实现解码全自动。
1 parent 5e6c02a commit 34e4d74

786 files changed

Lines changed: 96070 additions & 14 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Sample_Longxi.asv

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
%ModelSim������u0-u15 16���ƣ� 0000000100020003001000110012001300200021002200230030003100320033
1+
%ӡ���˵�ModelSim������u0-u15 16���ƣ� 0000000100020003001000110012001300200021002200230030003100320033
2+
23
N=8; K=8;
34
u=[0;0;0;1;0;1;1;1];
45
x=encodeLongxi(N,K,u,'AWGN',10);
@@ -15,8 +16,8 @@ y=afterTransmitInChannel(x);
1516
uhat=decodeLongxi(y,'AWGN',100)
1617

1718
N=16; K=16;
18-
u=[0;1;0;1;0;1;1;0;1;0;0;1;0;1;1;1];
19-
x=encodeLongxi(N,K,u,'AWGN',10);
19+
u=[0;1;0;1;0;1;0;1;0;1;0;1;0;1;0;1];
20+
x=encodeLongxi(N,K,u,'AWGN',10)
2021

2122
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2223
% NOTE: Except for plotPC(), it is a must to have

Sample_Longxi.txt

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
%ModelSim������u0-u15 16���ƣ� 0000000100020003001000110012001300200021002200230030003100320033
1+
%
2+
VHDL��Ҫ��һ��type vector_of_signed8 is array (natural range <>) of signed(7 downto 0);
3+
Ȼ��ɾ��testbench�����-- FOR ALL : HDL_DUT; -- USE ENTITY work.HDL_DUT(rtl);
4+
5+
26
N=8; K=8;
37
u=[0;0;0;1;0;1;1;1];
48
x=encodeLongxi(N,K,u,'AWGN',10);
@@ -18,6 +22,23 @@ N=16; K=16;
1822
u=[0;1;0;1;0;1;0;1;0;1;0;1;0;1;0;1];
1923
x=encodeLongxi(N,K,u,'AWGN',10)
2024

25+
����ʹ��RMA��
26+
persistent intArray;
27+
if isempty(intArray)
28+
testArray = [54 45 29 68 33 20 69 24 85 94
29+
33 53 68 1 79 74 55 12 84 65
30+
11 46 70 61 48 25 43 61 26 48
31+
62 88 7 39 4 92 65 46 62 64
32+
78 52 26 92 18 27 65 46 59 55
33+
43 95 23 1 73 77 68 67 55 65
34+
10 64 67 47 48 19 64 78 87 55
35+
27 96 85 43 16 29 95 36 27 73
36+
16 25 35 47 35 10 21 67 32 53
37+
29 68 79 78 61 58 71 42 12 100];
38+
intArray = int8(testArray);
39+
end
40+
u4 = intArray(5,7);
41+
2142
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2243
% NOTE: Except for plotPC(), it is a must to have
2344
% initPC() run before using any other routine.

WithStateMachine_decoderN2.slx

24.4 KB
Binary file not shown.
19.5 KB
Binary file not shown.

decoderN4.slx

31.4 KB
Binary file not shown.
25.6 KB
Binary file not shown.

defaultMatlabStateMachine.slx

26.4 KB
Binary file not shown.

defaultStateflow.slx

27.2 KB
Binary file not shown.

encoderN1024.vhd

Lines changed: 19471 additions & 0 deletions
Large diffs are not rendered by default.

encoderN2.vhd

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
LIBRARY IEEE;
2+
USE IEEE.std_logic_1164.ALL;
3+
USE IEEE.numeric_std.ALL;
4+
5+
ENTITY encoderN2 IS
6+
PORT(
7+
in1 : IN std_logic;
8+
in2 : IN std_logic;
9+
out1 : OUT std_logic;
10+
out2 : OUT std_logic
11+
);
12+
END encoderN2;
13+
14+
ARCHITECTURE rtl OF encoderN2 IS
15+
16+
SIGNAL Logical_Operator_out1_out1 : std_logic;
17+
18+
BEGIN
19+
20+
Logical_Operator_out1_out1 <= in1 XOR in2;
21+
22+
out1 <= Logical_Operator_out1_out1;
23+
24+
out2 <= in2;
25+
26+
END rtl;

0 commit comments

Comments
 (0)