mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 20:50:28 +00:00
Compare commits
223 Commits
2025.w20
...
ldpc_decod
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d37e64829b | ||
|
|
3ea2cd8b21 | ||
|
|
403b6ec572 | ||
|
|
e8dd817392 | ||
|
|
32248a6628 | ||
|
|
7ff4813a3d | ||
|
|
360435912d | ||
|
|
6d78852ac0 | ||
|
|
2ac916a847 | ||
|
|
e1d754322c | ||
|
|
ae492731af | ||
|
|
9c77c7e513 | ||
|
|
bdc8e1efa1 | ||
|
|
b51697c2c1 | ||
|
|
a3adab8312 | ||
|
|
e4d3520648 | ||
|
|
3420c2df41 | ||
|
|
7831e52798 | ||
|
|
701fd5a755 | ||
|
|
28dcbb49f8 | ||
|
|
42931472a5 | ||
|
|
55a4a0632a | ||
|
|
5305698b78 | ||
|
|
c4f8bb6cd0 | ||
|
|
ca968bbf8f | ||
|
|
b5b3e53a70 | ||
|
|
980b29415b | ||
|
|
8fb4cbedd7 | ||
|
|
00ac9f0469 | ||
|
|
2b6781a017 | ||
|
|
03e3fc8b1f | ||
|
|
def1f3ac38 | ||
|
|
e478d2ab28 | ||
|
|
7624903bce | ||
|
|
61b48a8e6b | ||
|
|
b0cf5e4b27 | ||
|
|
838bbdf7db | ||
|
|
c2856440ae | ||
|
|
39399f1a0c | ||
|
|
2f091764d2 | ||
|
|
af1a5d59a2 | ||
|
|
069463a3d5 | ||
|
|
e46f16ae60 | ||
|
|
4200f98fcf | ||
|
|
8d6279a9f8 | ||
|
|
699ba0932a | ||
|
|
9989516b6b | ||
|
|
9247017f06 | ||
|
|
ad6df4870a | ||
|
|
1422e7b5ad | ||
|
|
050c0e061d | ||
|
|
f8752d1485 | ||
|
|
83f4c6ea17 | ||
|
|
7244a33dc6 | ||
|
|
c123a0499b | ||
|
|
00a2dda48b | ||
|
|
205e92071a | ||
|
|
ce6225bd1f | ||
|
|
9a74fb2b47 | ||
|
|
8223e61ec1 | ||
|
|
78d93ff335 | ||
|
|
ff551fb902 | ||
|
|
dcb668593a | ||
|
|
08a6979191 | ||
|
|
712e8bbc9f | ||
|
|
e3b652b8ff | ||
|
|
6e2b6dd2f4 | ||
|
|
321bc27b67 | ||
|
|
695e4e6044 | ||
|
|
ad09d09ea0 | ||
|
|
5c4b1cc0be | ||
|
|
0bfd05ee35 | ||
|
|
0f81225abc | ||
|
|
307413ce24 | ||
|
|
de92c277b5 | ||
|
|
fc130034f5 | ||
|
|
1e73d9fa17 | ||
|
|
714707bbe3 | ||
|
|
147dc8998f | ||
|
|
3b2359dc0d | ||
|
|
17db765c19 | ||
|
|
299a6167ab | ||
|
|
9c8f25448a | ||
|
|
d824a5deef | ||
|
|
b12d46b7d6 | ||
|
|
ba61b16dc6 | ||
|
|
64e1704c2a | ||
|
|
38422eff50 | ||
|
|
75e707b893 | ||
|
|
28856b9f6a | ||
|
|
c740ba54a5 | ||
|
|
baa5843cc6 | ||
|
|
d52c5dcae1 | ||
|
|
010f5e4b04 | ||
|
|
52a6da8b85 | ||
|
|
94dbe1f946 | ||
|
|
215365ca87 | ||
|
|
11414c35b0 | ||
|
|
aedd4a9a69 | ||
|
|
6d76d2d889 | ||
|
|
8e1e40a13d | ||
|
|
6988f7015e | ||
|
|
efbc20b6ff | ||
|
|
df38dff948 | ||
|
|
085a9b2c0a | ||
|
|
ccf529ad3d | ||
|
|
84af1bbf7c | ||
|
|
f575917922 | ||
|
|
e92d6a85f9 | ||
|
|
6ac7a5d23d | ||
|
|
f86edbc6dc | ||
|
|
49a25f33fb | ||
|
|
4a948dad5a | ||
|
|
c8e6c05b3f | ||
|
|
4f2e735f5b | ||
|
|
8160dd3f0d | ||
|
|
2fc3cdf2b8 | ||
|
|
6c97af2bae | ||
|
|
77d361aa21 | ||
|
|
f63dac6e76 | ||
|
|
de64521228 | ||
|
|
8e6d8a1c4f | ||
|
|
7d63abd14c | ||
|
|
1a0c3764a4 | ||
|
|
79c03ae4b5 | ||
|
|
264b522fd2 | ||
|
|
7da4543ca8 | ||
|
|
f69b11bd0f | ||
|
|
0e188111b1 | ||
|
|
12c5b054f5 | ||
|
|
65d5cc8ac0 | ||
|
|
7a76b6adb9 | ||
|
|
a41a3a7bbe | ||
|
|
fc72657bf5 | ||
|
|
e0a97a23be | ||
|
|
20725355c8 | ||
|
|
1f6a943c63 | ||
|
|
4376de5e13 | ||
|
|
128eccf84b | ||
|
|
898be9efb7 | ||
|
|
a806f7d847 | ||
|
|
0e3aa00687 | ||
|
|
02a9023d26 | ||
|
|
e5022f03db | ||
|
|
b97a0a8ed0 | ||
|
|
b8b0ae1808 | ||
|
|
b417019711 | ||
|
|
23ce9c98e2 | ||
|
|
4ac89e6d46 | ||
|
|
32a800bbd2 | ||
|
|
949115e4f0 | ||
|
|
a06ad04366 | ||
|
|
1c8f88bbb8 | ||
|
|
2ad88ae0f3 | ||
|
|
b6a67635ee | ||
|
|
3cf8f6344c | ||
|
|
050a231b55 | ||
|
|
17c4d20042 | ||
|
|
bab05384a4 | ||
|
|
714b223a95 | ||
|
|
68b4535328 | ||
|
|
6574bc2c61 | ||
|
|
56330fde7c | ||
|
|
6856460923 | ||
|
|
b68d63e8ba | ||
|
|
e84b567a88 | ||
|
|
9a76f26b91 | ||
|
|
5dd1bea5da | ||
|
|
b69bc8cb5a | ||
|
|
63f3a6fa51 | ||
|
|
8f9b89925e | ||
|
|
09543b3255 | ||
|
|
1b84bd8b65 | ||
|
|
16740e5eb0 | ||
|
|
d405cbb77f | ||
|
|
f672d9088c | ||
|
|
e651a29a2a | ||
|
|
7f96a04c1b | ||
|
|
330b8dc8fa | ||
|
|
737b2f44c4 | ||
|
|
4129619714 | ||
|
|
f7a04de762 | ||
|
|
bcab56afb4 | ||
|
|
844986ff92 | ||
|
|
ad2a8a8991 | ||
|
|
c4617371f8 | ||
|
|
f84ec1340c | ||
|
|
8e2fcc900e | ||
|
|
3d78eb8426 | ||
|
|
afb138420b | ||
|
|
549c71c32c | ||
|
|
b815c8648c | ||
|
|
ae650bc9ea | ||
|
|
278a0bcc67 | ||
|
|
4eb55f83ab | ||
|
|
6638839177 | ||
|
|
b264ddc1ec | ||
|
|
073a705720 | ||
|
|
ffb8e8ff37 | ||
|
|
c3d0b2db5c | ||
|
|
944ac15ab5 | ||
|
|
2df487fc8b | ||
|
|
af7054554b | ||
|
|
d442461bd1 | ||
|
|
b5c9e13df3 | ||
|
|
07ff8a27c4 | ||
|
|
c1e057bc8b | ||
|
|
adbf056abb | ||
|
|
4dde956e84 | ||
|
|
b02e6e8ddd | ||
|
|
ea7e6ffb0b | ||
|
|
73c6d1fb62 | ||
|
|
f47b549f41 | ||
|
|
e45aff7763 | ||
|
|
300346c43a | ||
|
|
48e78ff4b0 | ||
|
|
ac9a8f017b | ||
|
|
1612ba33a8 | ||
|
|
d8b3bfd17b | ||
|
|
084bbb0363 | ||
|
|
ce17663017 | ||
|
|
729b0eb348 | ||
|
|
5354ad8a26 |
@@ -4,10 +4,9 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-OAI--Public--V1.1-blue" alt="License"></a>
|
||||
<a href="https://releases.ubuntu.com/20.04/"><img src="https://img.shields.io/badge/OS-Ubuntu20-Green" alt="Supported OS Ubuntu 20"></a>
|
||||
<a href="https://releases.ubuntu.com/22.04/"><img src="https://img.shields.io/badge/OS-Ubuntu22-Green" alt="Supported OS Ubuntu 22"></a>
|
||||
<a href="https://releases.ubuntu.com/24.04/"><img src="https://img.shields.io/badge/OS-Ubuntu24-Green" alt="Supported OS Ubuntu 24"></a>
|
||||
<a href="https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux"><img src="https://img.shields.io/badge/OS-RHEL9-Green" alt="Supported OS RELH9"></a>
|
||||
<a href="https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux"><img src="https://img.shields.io/badge/OS-RHEL9-Green" alt="Supported OS RHEL9"></a>
|
||||
<a href="https://getfedora.org/en/workstation/"><img src="https://img.shields.io/badge/OS-Fedore41-Green" alt="Supported OS Fedora 41"></a>
|
||||
</p>
|
||||
|
||||
@@ -16,7 +15,9 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://jenkins-oai.eurecom.fr/job/RAN-Container-Parent/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-Container-Parent%2F&label=build%20Images"></a>
|
||||
<a href="https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu18-Image-Builder/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-Ubuntu18-Image-Builder%2F&label=build-Ubuntu-x86%20Images"></a>
|
||||
<a href="https://jenkins-oai.eurecom.fr/job/RAN-RHEL8-Cluster-Image-Builder/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-RHEL8-Cluster-Image-Builder%2F&label=build-UBI-x86%20Images"></a>
|
||||
<a href="https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu-ARM-Image-Builder/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-Ubuntu-ARM-Image-Builder%2F&label=build-Ubuntu-ARM%20Images"></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
|
||||
@@ -83,7 +83,7 @@ gNBs =
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 2;
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
|
||||
#ra_ContentionResolutionTimer
|
||||
|
||||
@@ -34,9 +34,24 @@
|
||||
020002
|
||||
030001
|
||||
030002
|
||||
040002
|
||||
000004
|
||||
020001
|
||||
040002
|
||||
000004
|
||||
020001
|
||||
040002
|
||||
000004
|
||||
020001
|
||||
040002
|
||||
000004
|
||||
020001
|
||||
040002
|
||||
000004
|
||||
020001
|
||||
040001
|
||||
000004
|
||||
020002
|
||||
020001
|
||||
100001
|
||||
222222
|
||||
</TestCaseRequestedList>
|
||||
@@ -82,7 +97,7 @@
|
||||
<testCase id="000004">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
|
||||
<idle_sleep_time_in_sec>1</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020001">
|
||||
@@ -92,8 +107,8 @@
|
||||
<nodes>cacofonix</nodes>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>cacofonix</svr_node>
|
||||
<ping_args> -c 20 -i0.2</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
<ping_args> -c 20 -i0.5</ping_args>
|
||||
<ping_packetloss_threshold>80</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020002">
|
||||
@@ -139,13 +154,19 @@
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040002">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Force RRC_IDLE (UE ID 0)</desc>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ciUE force_RRC_IDLE | nc 192.168.71.150 8091</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100001">
|
||||
<class>Undeploy_Object</class>
|
||||
<always_exec>true</always_exec>
|
||||
<desc>Undeploy all OAI 5G stack</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_24prb</yaml_path>
|
||||
<d_retx_th>1,0,0,0</d_retx_th>
|
||||
<u_retx_th>1,0,0,0</u_retx_th>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
@@ -25,6 +25,8 @@ extern "C" {
|
||||
#include "common/config/config_userapi.h"
|
||||
void *config_allocate_new(configmodule_interface_t *cfg, int sz, bool autoFree);
|
||||
void config_check_valptr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, int elt_sz, int nb_elt);
|
||||
#include "../config_userapi.h"
|
||||
#include "../config_common.h"
|
||||
}
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
@@ -98,6 +100,9 @@ void SetDefault(configmodule_interface_t *cfg, paramdef_t *param)
|
||||
param->uptr = (uint32_t *)param->defintarrayval;
|
||||
}
|
||||
break;
|
||||
case TYPE_IPV4ADDR:
|
||||
config_setdefault_ipv4addr(cfg, param, param->defstrval);
|
||||
break;
|
||||
default:
|
||||
AssertFatal(false, "Unhandled type %d", param->type);
|
||||
}
|
||||
@@ -186,6 +191,16 @@ void SetNonDefault(configmodule_interface_t *cfg, const YAML::Node &node, paramd
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TYPE_IPV4ADDR: {
|
||||
std::string ipv4addr = node[optname].as<std::string>();
|
||||
char* ipv4addr_ptr = strdup(ipv4addr.c_str());
|
||||
int rst = config_assign_ipv4addr(cfg, param, ipv4addr_ptr);
|
||||
free(ipv4addr_ptr);
|
||||
if (rst < 0) {
|
||||
fprintf(stderr,"[LIBCONFIG] %s not valid for %s \n", ipv4addr.c_str(), optname.c_str());
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
AssertFatal(false, "Unhandled type %d", param->type);
|
||||
}
|
||||
|
||||
@@ -10,3 +10,4 @@ configure_file(test_string.yaml test_string.yaml COPYONLY)
|
||||
configure_file(test_list_of_mappings.yml test_list_of_mappings.yml COPYONLY)
|
||||
configure_file(test_int_array.yaml test_int_array.yaml COPYONLY)
|
||||
configure_file(test_read_mapping_as_list.yaml test_read_mapping_as_list.yaml COPYONLY)
|
||||
configure_file(test_ipv4.yaml test_ipv4.yaml COPYONLY)
|
||||
|
||||
4
common/config/yaml/tests/test_ipv4.yaml
Normal file
4
common/config/yaml/tests/test_ipv4.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
test:
|
||||
ipv4_1: 0.0.0.0
|
||||
ipv4_2: 192.168.0.1
|
||||
#ipv4_3: check default
|
||||
@@ -391,6 +391,36 @@ TEST(yaml_config, test_read_mapping_as_list) {
|
||||
end_configmodule(cfg);
|
||||
}
|
||||
|
||||
TEST(yaml_config, test_read_ipv4) {
|
||||
configmodule_interface_t *cfg = static_cast<configmodule_interface_t*>(calloc(1, sizeof(*cfg)));
|
||||
cfg->cfgP[0] = strdup("test_ipv4.yaml");
|
||||
EXPECT_EQ(config_yaml_init(cfg), 0);
|
||||
|
||||
paramdef_t p = {};
|
||||
p.type = TYPE_IPV4ADDR;
|
||||
strncpy(p.optname, "ipv4_1", sizeof(p.optname) - 1);
|
||||
uint32_t addr = 0;
|
||||
p.uptr = &addr;
|
||||
p.defstrval = nullptr;
|
||||
char prefix[] = "test";
|
||||
config_yaml_get(cfg, &p, 1, prefix);
|
||||
printf("%x\n", addr);
|
||||
|
||||
strncpy(p.optname, "ipv4_2", sizeof(p.optname) - 1);
|
||||
config_yaml_get(cfg, &p, 1, prefix);
|
||||
printf("%x\n", addr);
|
||||
|
||||
p.defstrval = strdup("10.0.0.1");
|
||||
strncpy(p.optname, "ipv4_3", sizeof(p.optname) - 1);
|
||||
config_yaml_get(cfg, &p, 1, prefix);
|
||||
printf("%x\n", addr);
|
||||
|
||||
config_yaml_end(cfg);
|
||||
free(cfg->cfgP[0]);
|
||||
end_configmodule(cfg);
|
||||
free(p.defstrval);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
logInit();
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
First, read the [basic usage](./basic.md) to compile things.
|
||||
|
||||
It is possible to use `wireshark` to analyse MAC PDUs for UEs,
|
||||
MIBs, SIBs, and random accesses seen by the eNodeB.
|
||||
MIBs, SIBs, and random accesses seen by the eNodeB. It also
|
||||
works for the gNB, as well as for the nrUE.
|
||||
|
||||
## Live usage
|
||||
|
||||
@@ -20,6 +21,14 @@ Then run:
|
||||
./macpdu2wireshark -d ../T_messages.txt -live
|
||||
```
|
||||
|
||||
Note: in some cases a MAC PDU may be bigger than the size of an UDP payload
|
||||
(slightly less than 64 KiB). This is particularily the case for large
|
||||
bandwidths in NR and MIMO. In this case macpdu2wireshark, sending UDP packets
|
||||
in its default mode of operations, will fail. By using the option `-to-file`
|
||||
a pcap file may be directly generated. You need to configure wireshark to
|
||||
process the generated files (run `macpdu2wireshark -h` to see how to
|
||||
configure wireshark for this case).
|
||||
|
||||
For other options of `macpdu2wireshark`, run:
|
||||
|
||||
```shell
|
||||
|
||||
@@ -115,6 +115,11 @@ typedef struct {
|
||||
int max_sib;
|
||||
int live;
|
||||
int no_bind;
|
||||
/* config to dump to file instead of UDP */
|
||||
/* output_filename != NULL means to output to file */
|
||||
char *output_filename;
|
||||
FILE *output_file;
|
||||
|
||||
/* runtime vars */
|
||||
int cur_mib;
|
||||
int cur_sib;
|
||||
@@ -129,19 +134,96 @@ typedef struct {
|
||||
int nr_next_ue_id;
|
||||
} ev_data;
|
||||
|
||||
/****************************************************************************/
|
||||
/* direct output to pcap file */
|
||||
/****************************************************************************/
|
||||
|
||||
void write_pcap_header(const char *filename, FILE *f)
|
||||
{
|
||||
/* see 'man pcap-savefile' for format */
|
||||
uint32_t magic = 0xa1b23c4d; /* magic for second/nanosecond */
|
||||
uint16_t major = 2;
|
||||
uint16_t minor = 4;
|
||||
uint32_t reserved = 0;
|
||||
uint32_t snapshot_length = 0x7fffffff; /* let's be generous */
|
||||
uint32_t link_layer_type = 252; /* DLT_WIRESHARK_UPPER_PDU */
|
||||
if (fwrite(&magic, 4, 1, f) != 1
|
||||
|| fwrite(&major, 2, 1, f) != 1
|
||||
|| fwrite(&minor, 2, 1, f) != 1
|
||||
|| fwrite(&reserved, 4, 1, f) != 1
|
||||
|| fwrite(&reserved, 4, 1, f) != 1
|
||||
|| fwrite(&snapshot_length, 4, 1, f) != 1
|
||||
|| fwrite(&link_layer_type, 4, 1, f) != 1) {
|
||||
printf("fatal: error writing header to %s\n", filename);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
const char *pcap_trace_header(int is_lte)
|
||||
{
|
||||
static char header_nr[] = {
|
||||
0x00, 12, /* type = EXP_PDU_TAG_DISSECTOR_NAME */
|
||||
0x00, 16, /* length */
|
||||
'm', 'a', 'c', '-', 'n', 'r', '-', 'f', 'r', 'a', 'm', 'e', 'd', 0, 0, 0,
|
||||
0x00, 0x00, 0x00, 0x00 /* EXP_PDU_TAG_END_OF_OPT with length 0 */
|
||||
};
|
||||
static char header_lte[] = {
|
||||
0x00, 12, /* type = EXP_PDU_TAG_DISSECTOR_NAME */
|
||||
0x00, 16, /* length */
|
||||
'm', 'a', 'c', '-', 'l', 't', 'e', '-', 'f', 'r', 'a', 'm', 'e', 'd', 0, 0,
|
||||
0x00, 0x00, 0x00, 0x00 /* EXP_PDU_TAG_END_OF_OPT with length 0 */
|
||||
};
|
||||
return is_lte ? header_lte : header_nr;
|
||||
}
|
||||
|
||||
void write_pcap_trace(const char *filename, FILE *f,
|
||||
struct timespec sending_time,
|
||||
const char *buf, int size, int is_lte)
|
||||
{
|
||||
uint32_t second = sending_time.tv_sec;
|
||||
uint32_t nanosecond = sending_time.tv_nsec;
|
||||
uint32_t length = size + 24;
|
||||
/* untruncated_length == length, we dump everything */
|
||||
uint32_t untruncated_length = length;
|
||||
if (fwrite(&second, 4, 1, f) != 1
|
||||
|| fwrite(&nanosecond, 4, 1, f) != 1
|
||||
|| fwrite(&length, 4, 1, f) != 1
|
||||
|| fwrite(&untruncated_length, 4, 1, f) != 1
|
||||
|| fwrite(pcap_trace_header(is_lte), 24, 1, f) != 1
|
||||
|| fwrite(buf, size, 1, f) != 1) {
|
||||
printf("fatal: error writing to file %s\n", filename);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
void write_pcap_trace_lte(const char *filename, FILE *f,
|
||||
struct timespec sending_time,
|
||||
const char *buf, int size)
|
||||
{
|
||||
write_pcap_trace(filename, f, sending_time, buf, size, 1);
|
||||
}
|
||||
|
||||
void write_pcap_trace_nr(const char *filename, FILE *f,
|
||||
struct timespec sending_time,
|
||||
const char *buf, int size)
|
||||
{
|
||||
write_pcap_trace(filename, f, sending_time, buf, size, 0);
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* LTE */
|
||||
/****************************************************************************/
|
||||
|
||||
void trace_lte(ev_data *d, int direction, int rnti_type, int rnti,
|
||||
int frame, int subframe, void *buf, int bufsize, int preamble,
|
||||
int sr_rnti)
|
||||
void trace_lte(struct timespec sending_time, ev_data *d, int direction,
|
||||
int rnti_type, int rnti, int frame, int subframe, void *buf,
|
||||
int bufsize, int preamble, int sr_rnti)
|
||||
{
|
||||
ssize_t ret;
|
||||
int fsf;
|
||||
int i;
|
||||
d->buf.osize = 0;
|
||||
PUTS(&d->buf, MAC_LTE_START_STRING);
|
||||
|
||||
if (!d->output_filename)
|
||||
PUTS(&d->buf, MAC_LTE_START_STRING);
|
||||
PUTC(&d->buf, FDD_RADIO);
|
||||
PUTC(&d->buf, direction);
|
||||
PUTC(&d->buf, rnti_type);
|
||||
@@ -202,16 +284,21 @@ void trace_lte(ev_data *d, int direction, int rnti_type, int rnti,
|
||||
for (i = 0; i < bufsize; i++)
|
||||
PUTC(&d->buf, ((char *)buf)[i]);
|
||||
|
||||
ret = sendto(d->socket, d->buf.obuf, d->buf.osize, 0,
|
||||
(struct sockaddr *)&d->to, sizeof(struct sockaddr_in));
|
||||
if (d->output_filename) {
|
||||
write_pcap_trace_lte(d->output_filename, d->output_file, sending_time,
|
||||
d->buf.obuf, d->buf.osize);
|
||||
} else {
|
||||
ret = sendto(d->socket, d->buf.obuf, d->buf.osize, 0,
|
||||
(struct sockaddr *)&d->to, sizeof(struct sockaddr_in));
|
||||
|
||||
if (ret != d->buf.osize) abort();
|
||||
if (ret != d->buf.osize) abort();
|
||||
}
|
||||
}
|
||||
|
||||
void ul(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
trace_lte(d, DIRECTION_UPLINK, C_RNTI, e.e[d->ul_rnti].i,
|
||||
trace_lte(e.sending_time, d, DIRECTION_UPLINK, C_RNTI, e.e[d->ul_rnti].i,
|
||||
e.e[d->ul_frame].i, e.e[d->ul_subframe].i,
|
||||
e.e[d->ul_data].b, e.e[d->ul_data].bsize,
|
||||
NO_PREAMBLE, NO_SR_RNTI);
|
||||
@@ -229,7 +316,7 @@ void dl(void *_d, event e)
|
||||
d->cur_sib++;
|
||||
}
|
||||
|
||||
trace_lte(d, DIRECTION_DOWNLINK,
|
||||
trace_lte(e.sending_time, d, DIRECTION_DOWNLINK,
|
||||
e.e[d->dl_rnti].i != 0xffff ? C_RNTI : SI_RNTI, e.e[d->dl_rnti].i,
|
||||
e.e[d->dl_frame].i, e.e[d->dl_subframe].i,
|
||||
e.e[d->dl_data].b, e.e[d->dl_data].bsize,
|
||||
@@ -245,7 +332,7 @@ void mib(void *_d, event e)
|
||||
if (d->max_mib && d->cur_mib == d->max_mib) return;
|
||||
|
||||
d->cur_mib++;
|
||||
trace_lte(d, DIRECTION_DOWNLINK, NO_RNTI, 0,
|
||||
trace_lte(e.sending_time, d, DIRECTION_DOWNLINK, NO_RNTI, 0,
|
||||
e.e[d->mib_frame].i, e.e[d->mib_subframe].i,
|
||||
e.e[d->mib_data].b, e.e[d->mib_data].bsize,
|
||||
NO_PREAMBLE, NO_SR_RNTI);
|
||||
@@ -254,7 +341,7 @@ void mib(void *_d, event e)
|
||||
void preamble(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
trace_lte(d, DIRECTION_UPLINK, NO_RNTI, 0,
|
||||
trace_lte(e.sending_time, d, DIRECTION_UPLINK, NO_RNTI, 0,
|
||||
e.e[d->preamble_frame].i, e.e[d->preamble_subframe].i,
|
||||
NULL, 0,
|
||||
e.e[d->preamble_preamble].i, NO_SR_RNTI);
|
||||
@@ -263,7 +350,7 @@ void preamble(void *_d, event e)
|
||||
void ue_preamble(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
trace_lte(d, DIRECTION_UPLINK, NO_RNTI, 0,
|
||||
trace_lte(e.sending_time, d, DIRECTION_UPLINK, NO_RNTI, 0,
|
||||
e.e[d->ue_preamble_frame].i, e.e[d->ue_preamble_subframe].i,
|
||||
NULL, 0,
|
||||
e.e[d->ue_preamble_preamble].i, NO_SR_RNTI);
|
||||
@@ -272,7 +359,8 @@ void ue_preamble(void *_d, event e)
|
||||
void rar(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
trace_lte(d, DIRECTION_DOWNLINK, RA_RNTI, e.e[d->rar_rnti].i,
|
||||
trace_lte(e.sending_time, d, DIRECTION_DOWNLINK,
|
||||
RA_RNTI, e.e[d->rar_rnti].i,
|
||||
e.e[d->rar_frame].i, e.e[d->rar_subframe].i,
|
||||
e.e[d->rar_data].b, e.e[d->rar_data].bsize,
|
||||
NO_PREAMBLE, NO_SR_RNTI);
|
||||
@@ -281,7 +369,7 @@ void rar(void *_d, event e)
|
||||
void sr(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
trace_lte(d, DIRECTION_UPLINK, NO_RNTI, 0,
|
||||
trace_lte(e.sending_time, d, DIRECTION_UPLINK, NO_RNTI, 0,
|
||||
e.e[d->sr_frame].i, e.e[d->sr_subframe].i,
|
||||
NULL, 0,
|
||||
NO_PREAMBLE, e.e[d->sr_rnti].i);
|
||||
@@ -310,14 +398,15 @@ void sr(void *_d, event e)
|
||||
#define NR_C_RNTI 3
|
||||
#define NR_SI_RNTI 4
|
||||
|
||||
void trace_nr(ev_data *d, int direction, int rnti_type, int rnti,
|
||||
int frame, int slot, int harq_pid, void *buf, int bufsize,
|
||||
int preamble)
|
||||
void trace_nr(struct timespec sending_time, ev_data *d, int direction,
|
||||
int rnti_type, int rnti, int frame, int slot, int harq_pid, void *buf,
|
||||
int bufsize, int preamble)
|
||||
{
|
||||
ssize_t ret;
|
||||
int i;
|
||||
d->buf.osize = 0;
|
||||
PUTS(&d->buf, MAC_NR_START_STRING);
|
||||
if (!d->output_filename)
|
||||
PUTS(&d->buf, MAC_NR_START_STRING);
|
||||
PUTC(&d->buf, NR_TDD_RADIO);
|
||||
PUTC(&d->buf, direction);
|
||||
PUTC(&d->buf, rnti_type);
|
||||
@@ -361,17 +450,23 @@ void trace_nr(ev_data *d, int direction, int rnti_type, int rnti,
|
||||
for (i = 0; i < bufsize; i++)
|
||||
PUTC(&d->buf, ((char *)buf)[i]);
|
||||
|
||||
ret = sendto(d->socket, d->buf.obuf, d->buf.osize, 0,
|
||||
(struct sockaddr *)&d->to, sizeof(struct sockaddr_in));
|
||||
if (d->output_filename) {
|
||||
write_pcap_trace_nr(d->output_filename, d->output_file, sending_time,
|
||||
d->buf.obuf, d->buf.osize);
|
||||
} else {
|
||||
ret = sendto(d->socket, d->buf.obuf, d->buf.osize, 0,
|
||||
(struct sockaddr *)&d->to, sizeof(struct sockaddr_in));
|
||||
|
||||
if (ret != d->buf.osize) abort();
|
||||
if (ret != d->buf.osize) abort();
|
||||
}
|
||||
}
|
||||
|
||||
void nr_ul(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
|
||||
trace_nr(d, NR_DIRECTION_UPLINK, NR_C_RNTI, e.e[d->nr_ul_rnti].i,
|
||||
trace_nr(e.sending_time, d, NR_DIRECTION_UPLINK,
|
||||
NR_C_RNTI, e.e[d->nr_ul_rnti].i,
|
||||
e.e[d->nr_ul_frame].i, e.e[d->nr_ul_slot].i,
|
||||
e.e[d->nr_ul_harq_pid].i, e.e[d->nr_ul_data].b,
|
||||
e.e[d->nr_ul_data].bsize, NO_PREAMBLE);
|
||||
@@ -389,7 +484,7 @@ void nr_dl(void *_d, event e)
|
||||
d->cur_sib++;
|
||||
}
|
||||
|
||||
trace_nr(d, NR_DIRECTION_DOWNLINK,
|
||||
trace_nr(e.sending_time, d, NR_DIRECTION_DOWNLINK,
|
||||
e.e[d->nr_dl_rnti].i != 0xffff ? NR_C_RNTI : NR_SI_RNTI,
|
||||
e.e[d->nr_dl_rnti].i, e.e[d->nr_dl_frame].i, e.e[d->nr_dl_slot].i,
|
||||
e.e[d->nr_dl_harq_pid].i, e.e[d->nr_dl_data].b,
|
||||
@@ -400,7 +495,8 @@ void nr_dl_retx(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
|
||||
trace_nr(d, NR_DIRECTION_DOWNLINK, NR_C_RNTI, e.e[d->nr_dl_retx_rnti].i,
|
||||
trace_nr(e.sending_time, d, NR_DIRECTION_DOWNLINK,
|
||||
NR_C_RNTI, e.e[d->nr_dl_retx_rnti].i,
|
||||
e.e[d->nr_dl_retx_frame].i, e.e[d->nr_dl_retx_slot].i,
|
||||
e.e[d->nr_dl_retx_harq_pid].i, e.e[d->nr_dl_retx_data].b,
|
||||
e.e[d->nr_dl_retx_data].bsize, NO_PREAMBLE);
|
||||
@@ -416,7 +512,7 @@ void nr_mib(void *_d, event e)
|
||||
|
||||
d->cur_mib++;
|
||||
|
||||
trace_nr(d, NR_DIRECTION_DOWNLINK, NR_NO_RNTI, 0,
|
||||
trace_nr(e.sending_time, d, NR_DIRECTION_DOWNLINK, NR_NO_RNTI, 0,
|
||||
e.e[d->nr_mib_frame].i, e.e[d->nr_mib_slot].i, 0 /* harq pid */,
|
||||
e.e[d->nr_mib_data].b, e.e[d->nr_mib_data].bsize, NO_PREAMBLE);
|
||||
}
|
||||
@@ -431,7 +527,7 @@ void nr_ue_mib(void *_d, event e)
|
||||
|
||||
d->cur_mib++;
|
||||
|
||||
trace_nr(d, NR_DIRECTION_DOWNLINK, NR_NO_RNTI, 0,
|
||||
trace_nr(e.sending_time, d, NR_DIRECTION_DOWNLINK, NR_NO_RNTI, 0,
|
||||
e.e[d->nr_ue_mib_frame].i, e.e[d->nr_ue_mib_slot].i, 0 /* harq pid */,
|
||||
e.e[d->nr_ue_mib_data].b, e.e[d->nr_ue_mib_data].bsize, NO_PREAMBLE);
|
||||
}
|
||||
@@ -440,7 +536,8 @@ void nr_rar(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
|
||||
trace_nr(d, NR_DIRECTION_DOWNLINK, NR_RA_RNTI, e.e[d->nr_rar_rnti].i,
|
||||
trace_nr(e.sending_time, d, NR_DIRECTION_DOWNLINK,
|
||||
NR_RA_RNTI, e.e[d->nr_rar_rnti].i,
|
||||
e.e[d->nr_rar_frame].i, e.e[d->nr_rar_slot].i, 0 /* harq pid */,
|
||||
e.e[d->nr_rar_data].b, e.e[d->nr_rar_data].bsize, NO_PREAMBLE);
|
||||
}
|
||||
@@ -449,7 +546,8 @@ void nr_ue_ul(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
|
||||
trace_nr(d, NR_DIRECTION_UPLINK, NR_C_RNTI, e.e[d->nr_ue_ul_rnti].i,
|
||||
trace_nr(e.sending_time, d, NR_DIRECTION_UPLINK,
|
||||
NR_C_RNTI, e.e[d->nr_ue_ul_rnti].i,
|
||||
e.e[d->nr_ue_ul_frame].i, e.e[d->nr_ue_ul_slot].i,
|
||||
e.e[d->nr_ue_ul_harq_pid].i, e.e[d->nr_ue_ul_data].b,
|
||||
e.e[d->nr_ue_ul_data].bsize, NO_PREAMBLE);
|
||||
@@ -467,7 +565,7 @@ void nr_ue_dl(void *_d, event e)
|
||||
d->cur_sib++;
|
||||
}
|
||||
|
||||
trace_nr(d, NR_DIRECTION_DOWNLINK,
|
||||
trace_nr(e.sending_time, d, NR_DIRECTION_DOWNLINK,
|
||||
e.e[d->nr_ue_dl_rnti].i != 0xffff ? NR_C_RNTI : NR_SI_RNTI,
|
||||
e.e[d->nr_ue_dl_rnti].i, e.e[d->nr_ue_dl_frame].i,
|
||||
e.e[d->nr_ue_dl_slot].i, e.e[d->nr_ue_dl_harq_pid].i,
|
||||
@@ -477,7 +575,8 @@ void nr_ue_dl(void *_d, event e)
|
||||
void nr_ue_rar(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
trace_nr(d, DIRECTION_DOWNLINK, RA_RNTI, e.e[d->nr_ue_rar_rnti].i,
|
||||
trace_nr(e.sending_time, d, DIRECTION_DOWNLINK,
|
||||
RA_RNTI, e.e[d->nr_ue_rar_rnti].i,
|
||||
e.e[d->nr_ue_rar_frame].i, e.e[d->nr_ue_rar_slot].i, 0,
|
||||
e.e[d->nr_ue_rar_data].b, e.e[d->nr_ue_rar_data].bsize,
|
||||
NO_PREAMBLE);
|
||||
@@ -833,7 +932,15 @@ void usage(void)
|
||||
" -live-port <port> tracee's port (default %d)\n"
|
||||
" -no-bind don't bind to IP address (for remote logging)\n"
|
||||
"-i and -live are mutually exclusive options. One of them must be provided\n"
|
||||
"but not both.\n",
|
||||
"but not both.\n"
|
||||
"\n"
|
||||
"Use the following options to dump to a file instead of sending UDP packets:\n"
|
||||
" -to-file <filename> dump to file using the mac framed format\n"
|
||||
"\n"
|
||||
"To use wireshark with files created using the option '-to-file',\n"
|
||||
"you need to configure wireshark:\n"
|
||||
" in Analyze->Enabled Protocols search for MAC-NR-FRAMED and\n"
|
||||
" MAC-LTE-FRAMED and enable them.\n",
|
||||
DEFAULT_IP,
|
||||
DEFAULT_PORT,
|
||||
DEFAULT_LIVE_IP,
|
||||
@@ -881,11 +988,13 @@ int main(int n, char **v)
|
||||
if (!strcmp(v[i], "-live-ip")) { if(i>n-2)usage(); live_ip = v[++i]; continue; }
|
||||
if (!strcmp(v[i], "-live-port")) { if(i>n-2)usage(); live_port = atoi(v[++i]); continue; }
|
||||
if (!strcmp(v[i], "-no-bind")) { d.no_bind = 1; continue; }
|
||||
if (!strcmp(v[i], "-to-file")) { if(i>n-2)usage(); d.output_filename = v[++i]; continue; }
|
||||
usage();
|
||||
}
|
||||
|
||||
if (database_filename == NULL) {
|
||||
printf("ERROR: provide a database file (-d)\n");
|
||||
printf("use -h for help on usage\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -992,17 +1101,27 @@ int main(int n, char **v)
|
||||
register_handler_function(h, nr_ue_dl_id, nr_ue_dl, &d);
|
||||
register_handler_function(h, nr_ue_rar_id, nr_ue_rar, &d);
|
||||
|
||||
d.socket = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (d.output_filename) {
|
||||
d.output_file = fopen(d.output_filename, "w");
|
||||
if (d.output_file == NULL) {
|
||||
perror(d.output_filename);
|
||||
exit(1);
|
||||
}
|
||||
write_pcap_header(d.output_filename, d.output_file);
|
||||
} else {
|
||||
d.socket = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
|
||||
if (d.socket == -1) {
|
||||
perror("socket");
|
||||
exit(1);
|
||||
if (d.socket == -1) {
|
||||
perror("socket");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
d.to.sin_family = AF_INET;
|
||||
d.to.sin_port = htons(port);
|
||||
d.to.sin_addr.s_addr = inet_addr(ip);
|
||||
new_thread(receiver, &d);
|
||||
}
|
||||
|
||||
d.to.sin_family = AF_INET;
|
||||
d.to.sin_port = htons(port);
|
||||
d.to.sin_addr.s_addr = inet_addr(ip);
|
||||
new_thread(receiver, &d);
|
||||
OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL};
|
||||
|
||||
/* read messages */
|
||||
@@ -1025,5 +1144,10 @@ int main(int n, char **v)
|
||||
handle_event(h, e);
|
||||
}
|
||||
|
||||
if (d.output_filename) {
|
||||
if (fclose(d.output_file))
|
||||
perror(d.output_filename);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -102,12 +102,21 @@ int force_crnti_ra(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int force_deregistration(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
{
|
||||
MessageDef *msg = itti_alloc_new_message(TASK_NAS_NRUE, 0, NAS_DEREGISTRATION_REQ);
|
||||
NAS_DEREGISTRATION_REQ(msg).cause = AS_DETACH;
|
||||
itti_send_msg_to_task(TASK_NAS_NRUE, 0, msg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Telnet shell command definitions */
|
||||
static telnetshell_cmddef_t cicmds[] = {
|
||||
{"sync_state", "[UE_ID(int,opt)]", get_sync_state},
|
||||
{"force_rlf", "", force_rlf},
|
||||
{"force_RRC_IDLE", "", force_RRC_IDLE},
|
||||
{"force_crnti_ra", "", force_crnti_ra},
|
||||
{"deregistration", "", force_deregistration},
|
||||
{"", "", NULL},
|
||||
};
|
||||
|
||||
|
||||
@@ -168,10 +168,14 @@ static bool change_interface_state(int sock_fd, const char *ifn, if_action_t if_
|
||||
|
||||
struct ifreq ifr = {0};
|
||||
strncpy(ifr.ifr_name, ifn, sizeof(ifr.ifr_name));
|
||||
|
||||
/* get flags of this interface: see netdevice(7) */
|
||||
bool success = ioctl(sock_fd, SIOCGIFFLAGS, (caddr_t)&ifr) == 0;
|
||||
if (!success)
|
||||
goto fail_interface_state;
|
||||
if (!success && if_action == INTERFACE_DOWN && errno == ENODEV) {
|
||||
LOG_W(OIP, "trying to remove non-existant device %s\n", ifn);
|
||||
return true;
|
||||
}
|
||||
LOG_D(OIP, "Got flags for %s: 0x%x (action: %s)\n", ifn, ifr.ifr_flags, action);
|
||||
|
||||
if (if_action == INTERFACE_UP) {
|
||||
ifr.ifr_flags |= IFF_UP | IFF_NOARP | IFF_POINTOPOINT;
|
||||
@@ -183,6 +187,8 @@ static bool change_interface_state(int sock_fd, const char *ifn, if_action_t if_
|
||||
success = ioctl(sock_fd, SIOCSIFFLAGS, (caddr_t)&ifr) == 0;
|
||||
if (!success)
|
||||
goto fail_interface_state;
|
||||
LOG_D(OIP, "Interface %s successfully set %s\n", ifn, action);
|
||||
|
||||
return true;
|
||||
|
||||
fail_interface_state:
|
||||
@@ -201,10 +207,6 @@ bool tun_config(const char* ifname, const char *ipv4, const char *ipv6)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!change_interface_state(sock_fd, ifname, INTERFACE_DOWN)) {
|
||||
close(sock_fd);
|
||||
return false;
|
||||
}
|
||||
bool success = true;
|
||||
if (ipv4 != NULL)
|
||||
success = setInterfaceParameter(sock_fd, ifname, AF_INET, ipv4, SIOCSIFADDR);
|
||||
@@ -272,8 +274,17 @@ int tun_generate_ue_ifname(char *ifname, int instance_id, int pdu_session_id)
|
||||
return snprintf(ifname, IFNAMSIZ, "%s%d%s", "oaitun_ue", instance_id + 1, pdu_session_id == -1 ? "" : pdu_session_string);
|
||||
}
|
||||
|
||||
void tun_destroy(const char *dev, int fd) {
|
||||
if (change_interface_state(fd, dev, INTERFACE_DOWN) == 0) {
|
||||
void tun_destroy(const char *dev)
|
||||
{
|
||||
// Use a new socket for ioctl operations
|
||||
int fd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (fd < 0) {
|
||||
LOG_E(UTIL, "Failed to create socket for interface teardown: %d, %s\n", errno, strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
bool success = change_interface_state(fd, dev, INTERFACE_DOWN);
|
||||
if (success) {
|
||||
LOG_I(UTIL, "Interface %s is now down.\n", dev);
|
||||
} else {
|
||||
LOG_E(UTIL, "Could not bring interface %s down.\n", dev);
|
||||
|
||||
@@ -84,8 +84,7 @@ int tun_alloc(const char *dev);
|
||||
/*!
|
||||
* \brief This function destroys the TUN interface
|
||||
* \param[in] dev name of the interface
|
||||
* \param[in] fd file descriptor of the allocated interface
|
||||
*/
|
||||
void tun_destroy(const char *dev, int fd);
|
||||
void tun_destroy(const char *dev);
|
||||
|
||||
#endif /*TUN_IF_H_*/
|
||||
|
||||
153
doc/5Gnas.md
153
doc/5Gnas.md
@@ -1,106 +1,109 @@
|
||||
<style type="text/css" rel="stylesheet">
|
||||
**5GS NAS Overview and OAI Implementation status**
|
||||
|
||||
body {
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
color: #fff;
|
||||
background-color: #110F14;
|
||||
}
|
||||
h2 { margin-left: 20px; }
|
||||
h3 { margin-left: 40px; }
|
||||
h4 { margin-left: 60px; }
|
||||
This document provides an overview of the 5G System Non-Access Stratum (5GS NAS) protocol as specified in 3GPP TS 24.501. It highlights key message types involved in Mobility and Session Management and explains how these are implemented within the OAI software stack. The document outlines the structure of the OAI codebase by detailing current support for encoding, decoding, and unit testing of specific NAS messages, and explains how the UE handles USIM simulation and message generation.
|
||||
|
||||
.func2 { margin-left: 20px; }
|
||||
.func3 { margin-left: 40px; }
|
||||
.func4 { margin-left: 60px; }
|
||||
[TOC]
|
||||
|
||||
</style>
|
||||
# About 5GS NAS
|
||||
|
||||
The 5G System Non-Access Stratum (5GS NAS) is defined in 3GPP TS 24.501. It operates within the control plane, facilitating communication between the User Equipment (UE) and the Access and Mobility Management Function (AMF) over the N1 interface.
|
||||
|
||||
This tuto for 5G gNB NAS design
|
||||
{: .text-center}
|
||||
Key 5GS NAS messages:
|
||||
|
||||
# source files
|
||||
* Mobility Management (5GMM): Handles UE registration, deregistration, authentication and tracking area updates. 5GMM also manages transitions between idle and connected states.
|
||||
* Session Management (5GSM): Establishes, modifies, and releases PDU sessions. Coordinates with the Session Management Function (SMF) to manage user-plane resources.
|
||||
|
||||
openair2/RRC/NR/nr_ngap_gNB.c: skeleton for interface with NGAP
|
||||
openair3/NAS/COMMON/milenage.h: a simple milenage implementation, depend only on crypto library
|
||||
openair3/NAS/COMMON/NR_NAS_defs.h: messages defined for NAS implemented in C: C struct, C enums and automatic conversion to labels for debug messages
|
||||
openair3/NAS/COMMON/nr_common.c: 5G NAS common code between gNB and UE
|
||||
openair3/UICC/usim_interface.c: UICC simulation for USIM messages
|
||||
# OAI Implementation Status
|
||||
|
||||
openair3/NAS/NR_UE/ue_process_nas.c: NAS code for UE
|
||||
The following tables lists implemented NAS messages and whether there is an encoder or decoder function, and if a corresponding unit test exists.
|
||||
|
||||
openair3/NAS/gNB/network_process_nas.c: NAS code for gNB running without 5GC
|
||||
| Type | Message | Encoding | Decoding | Unit test |
|
||||
|-------|-------------------------------------------|----------|----------|------------|
|
||||
| 5GMM | Service Request | yes | yes | yes |
|
||||
| 5GMM | Service Accept | yes | yes | yes |
|
||||
| 5GMM | Service Reject | yes | yes | yes |
|
||||
| 5GMM | Authentication Response | yes | no | no |
|
||||
| 5GMM | Identity Response | yes | no | no |
|
||||
| 5GMM | Security Mode Complete | yes | no | no |
|
||||
| 5GMM | Uplink NAS Transport | yes | no | no |
|
||||
| 5GMM | Registration Request | yes | yes | no |
|
||||
| 5GMM | Registration Accept | yes | yes | yes |
|
||||
| 5GMM | Registration Complete | yes | yes | no |
|
||||
| 5GMM | Deregistration Request (UE originating) | yes | no | no |
|
||||
| 5GSM | PDU Session Establishment Request | yes | no | no |
|
||||
| 5GSM | PDU Session Establishment Accept | no | yes | no |
|
||||
|
||||
openair3/TEST/test5Gnas.c: unitary testing of NAS messages: encodes+decode a standard network entry, mixing code from UE and 5GC (or gNB in noCore)
|
||||
## Code Structure
|
||||
|
||||
# USIM simulation
|
||||
A new USIM simulation, that parameters are in regular OAI config files
|
||||
[openair3/NAS/NR_UE/nr_nas_msg.c](../openair3/NAS/NR_UE/nr_nas_msg.c):
|
||||
* NAS procedures and message handlers/callbacks
|
||||
* Integration with RRC (ITTI) and SDAP
|
||||
* Invokes enc/dec libraries
|
||||
* Handles 5GMM state and mode
|
||||
|
||||
## To open the USIM
|
||||
init_uicc() takes a parameter: the name of the block in the config file
|
||||
In case we run several UEs in one process, the variable section name allows to make several UEs configurations in one config file.
|
||||
[openair3/NAS/NR_UE/5GS/fgs_nas_lib.c](../openair3/NAS/NR_UE/5GS/fgs_nas_lib.c):
|
||||
[openair3/NAS/NR_UE/5GS/NR_NAS_defs.h](../openair3/NAS/NR_UE/5GS/NR_NAS_defs.h):
|
||||
* encoding and decoding functions for 5G NAS message headers and payloads
|
||||
* relies on 5GMM/5GSM messages libs for payload encoding
|
||||
|
||||
The NAS implementation uses this possibility.
|
||||
[openair3/NAS/NR_UE/5GS/fgs_nas_utils.h](../openair3/NAS/NR_UE/5GS/fgs_nas_utils.h):
|
||||
* NAS helpers, macros
|
||||
|
||||
# UE side
|
||||
UEprocessNAS() is the entry for all messages.
|
||||
It decodes the message type and call the specific function for each messgae
|
||||
[openair3/NAS/NR_UE/5GS/5GMM](../openair3/NAS/NR_UE/5GS/5GMM):
|
||||
* encoding/decoding functions and definitions for 5GMM NAS messages payloads
|
||||
|
||||
## Identityrequest + IdentityResponse
|
||||
When the UE receives the request, it stores the 5GC request parameters in the UE context ( UE->uicc pointer)
|
||||
It calls "scheduleNAS", that would trigger a answer (seeing general archtecture, it will probly be a itti message to future RRC or NGAP thread).
|
||||
[openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.c](../openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.c):
|
||||
[openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.h](../openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.h):
|
||||
* encoding/decoding functions and definitions for common 5GMM IEs
|
||||
|
||||
When the scheduler wants to encode the answer, it calls identityResponse()
|
||||
The UE search for a section in the config file called "uicc"
|
||||
it encodes the NAS answer with the IMSI, as a 4G compatible authentication.
|
||||
A future release would encode 5G SUPI as native 5G UICC.
|
||||
[openair3/NAS/NR_UE/5GS/5GSM](../openair3/NAS/NR_UE/5GS/5GSM):
|
||||
* encoding and decoding functions for 5GSM NAS messages payloads
|
||||
|
||||
## Authenticationrequest + authenticationResponse
|
||||
When the UE receives the request, it stores the 5GC request parameters in the UE context ( UE->uicc pointer)
|
||||
It calls "scheduleNAS", that would trigger a answer (seeing general archtecture, it will probly be a itti message to future RRC or NGAP thread).
|
||||
# USIM Simulation
|
||||
|
||||
When the scheduler wants to encode the answer, it calls authenticationResponse()
|
||||
The UE search for a section in the config file called "uicc"
|
||||
It uses the Milenage parameters of this section to encode a milenage response
|
||||
A future release would encode 5G new authentication cyphering functions.
|
||||
OAI includes a simulated USIM implementation that reads its parameters from standard configuration files. This allows for rapid prototyping and testing without relying on a physical UICC card. The USIM-related configuration is handled via the `init_uicc()` function.
|
||||
|
||||
## SecurityModeCommand + securityModeComplete
|
||||
When the UE receives the request it will:
|
||||
Selected NAS security algorithms: store it for future encoding
|
||||
Replayed UE security capabilities: check if it is equal to UE capabilities it sent to the 5GC
|
||||
IMEISV request: to implement
|
||||
ngKSI: Key set Indicator, similator to 4G to select a ciphering keys set
|
||||
## Configuration
|
||||
|
||||
When the scheduler wants to encode the answer, it calls registrationComplete()
|
||||
The simulation reads values from a named section in the config file.
|
||||
|
||||
## registrationComplete
|
||||
To be defined in UE, this NAS message is done after RRC sequence completes
|
||||
**Config options in the `uicc` section**:
|
||||
|
||||
# gNB side
|
||||
gNB NGAP thread receives the NAS message from PHY layers
|
||||
In normal mode, it send it to the core network with no decoding.
|
||||
| Parameter | Description | Default value |
|
||||
|---------------|-----------------------------------|--------------------------------------------|
|
||||
| `imsi` | User IMSI | `2089900007487` |
|
||||
| `nmc_size` | Number of digits in NMC | `2` |
|
||||
| `key` | Subscription key (Ki) | `fec86ba6eb707ed08905757b1bb44b8f` |
|
||||
| `opc` | OPc value | `c42449363bbad02b66d16bc975d77cc1` |
|
||||
| `amf` | AMF value | `8000` |
|
||||
| `sqn` | Sequence number | `000000` |
|
||||
| `dnn` | Default DNN (APN) | `oai` |
|
||||
| `nssai_sst` | NSSAI slice/service type | `1` |
|
||||
| `nssai_sd` | NSSAI slice differentiator | `0xffffff` |
|
||||
| `imeisv` | IMEISV string | `6754567890123413` |
|
||||
|
||||
Here after, the gNB mode "noCore" processing in gNB: NGAP calls the entry function: processNAS() instead of forwarding the packet to the 5GC
|
||||
These are parsed and stored in the `uicc_t` structure.
|
||||
|
||||
## RRCModeComplete + Identityrequest
|
||||
When the gNB completes RRC attach, it sends a first message to NGAP thread.
|
||||
Normal processing sends NGAP initial UE message, in noCore mode, it should call: identityRequest() that encode the NAS identity request inside the gNB.
|
||||
The gNB NGAP thread then should call the piece of code that forward the message to the UE as when it receives a NAS message from 5GC.
|
||||
## Initialization
|
||||
|
||||
## All NAS coming from UE
|
||||
When NGAP thread receives a NAS message from lower layers, it encapsulates it to forward it to the 5GC. In "noCore" mode it calls processNAS().
|
||||
The UE calls `init_uicc` via `checkUicc` to allocate memory for the `uicc_t` structure member and load parameters using `config_get()` from the selected config section. Then the UICC structure is stored in the NAS context. `nr_ue_nas_t`, to be used to fill identity and security credentials when generating responses to 5GC messages such as `Identity Response`, `Authentication Response`, and `Security Mode Complete`.
|
||||
|
||||
This function stores in the gNB the NAS data, then it should encode the next message (identity, authentication, security mode) or do nothing (registration complete).
|
||||
## Milenage Authentication and Key Derivation
|
||||
|
||||
When the UE receives a **5GMM Authentication Request**, the function `generateAuthenticationResp` generates a valid `Authentication Response` with the necessary derived NAS and AS security keys. The function `derive_ue_keys` parses the Authentication Request and performs the entire 5G AKA key hierarchy:
|
||||
|
||||
<div class="panel panel-info">
|
||||
**Note**
|
||||
{: .panel-heading}
|
||||
<div class="panel-body">
|
||||
* Extracts the `RAND` and `SQN`
|
||||
* Performs Milenage Algorithms f2-f5 using `f2345()` from the UICC input
|
||||
* Computes the `RES` using `transferRES()`
|
||||
* Derives the keys `KAUSF`, `KSEAF`, `KAMF`, `KNASenc`/`KNASint` via `derive_knas()` and `KGNB` for RRC ciphering (via `derive_kgnb()`)
|
||||
|
||||
## Security Mode Complete
|
||||
|
||||
</div>
|
||||
</div>
|
||||
When the UE receives a **Security Mode Command** from the 5GC, it responds with a `Security Mode Complete` message. This message is protected with the newly established NAS security context and may carry additional payloads, including the UE’s identity and a nested NAS message (e.g., `Registration Request`) in the `FGSNasMessageContainer`. The function responsible for building and securing this response is `generateSecurityModeComplete`.
|
||||
|
||||
### IMEISV
|
||||
|
||||
The **IMEISV**, is encoded using the `fill_imeisv()` helper. This function extracts each digit from the configured `imeisvStr` in the UICC context and populates the mobile identity structure.
|
||||
|
||||
See TS 24.501 §4.4 for reference.
|
||||
|
||||
|
||||
@@ -86,9 +86,7 @@ Legacy unmaintained files:
|
||||
- [Information on gNB MAC](./MAC/mac-usage.md)
|
||||
- [Information on gNB RRC](./RRC/rrc-usage.md)
|
||||
- [Information on analog beamforming implementation](./analog_beamforming.md)
|
||||
|
||||
Legacy unmaintained files:
|
||||
- [`5Gnas.md`](./5Gnas.md)
|
||||
- [Information on the UE 5G NAS implementation](./5Gnas.md)
|
||||
|
||||
# Building and running from images
|
||||
|
||||
|
||||
@@ -106,9 +106,12 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg);
|
||||
static void start_process_slot_tx(void* arg) {
|
||||
notifiedFIFO_elt_t *newTx = arg;
|
||||
nr_rxtx_thread_data_t *curMsgTx = NotifiedFifoData(newTx);
|
||||
int num_ul_actors_to_use =
|
||||
get_nrUE_params()->num_ul_actors == 0 ? NUM_UL_ACTORS : min(get_nrUE_params()->num_ul_actors, NUM_UL_ACTORS);
|
||||
pushNotifiedFIFO(&curMsgTx->UE->ul_actors[curMsgTx->proc.nr_slot_tx % num_ul_actors_to_use].fifo, newTx);
|
||||
int num_ul_actors = get_nrUE_params()->num_ul_actors;
|
||||
if (num_ul_actors > 0) {
|
||||
pushNotifiedFIFO(&curMsgTx->UE->ul_actors[curMsgTx->proc.nr_slot_tx % num_ul_actors].fifo, newTx);
|
||||
} else {
|
||||
newTx->processingFunc(curMsgTx);
|
||||
}
|
||||
}
|
||||
|
||||
static size_t dump_L1_UE_meas_stats(PHY_VARS_NR_UE *ue, char *output, size_t max_len)
|
||||
@@ -677,10 +680,10 @@ static int handle_sync_req_from_mac(PHY_VARS_NR_UE *UE)
|
||||
|
||||
/* Clearing UE harq while DL actors are active causes race condition.
|
||||
So we let the current execution to complete here.*/
|
||||
for (int i = 0; i < NUM_DL_ACTORS; i++) {
|
||||
for (int i = 0; i < get_nrUE_params()->num_dl_actors; i++) {
|
||||
flush_actor(UE->dl_actors + i);
|
||||
}
|
||||
for (int i = 0; i < NUM_UL_ACTORS; i++) {
|
||||
for (int i = 0; i < get_nrUE_params()->num_ul_actors; i++) {
|
||||
flush_actor(UE->ul_actors + i);
|
||||
}
|
||||
|
||||
@@ -1183,7 +1186,11 @@ void *UE_thread(void *arg)
|
||||
int ret = UE_dl_preprocessing(UE, &curMsgRx->proc, tx_wait_for_dlsch, &curMsgRx->phy_data, &stats_printed);
|
||||
if (ret != INT_MAX)
|
||||
shiftForNextFrame = ret;
|
||||
pushNotifiedFIFO(&UE->dl_actors[curMsg.proc.nr_slot_rx % NUM_DL_ACTORS].fifo, newRx);
|
||||
if (get_nrUE_params()->num_dl_actors > 0) {
|
||||
pushNotifiedFIFO(&UE->dl_actors[curMsg.proc.nr_slot_rx % get_nrUE_params()->num_dl_actors].fifo, newRx);
|
||||
} else {
|
||||
newRx->processingFunc(curMsgRx);
|
||||
}
|
||||
|
||||
// apply new NTN timing information
|
||||
apply_ntn_config(UE, fp, slot_nr, &duration_rx_to_tx, &timing_advance, &ntn_koffset);
|
||||
|
||||
@@ -506,11 +506,17 @@ int main(int argc, char **argv)
|
||||
|
||||
UE[CC_id]->sl_mode = get_softmodem_params()->sl_mode;
|
||||
init_actor(&UE[CC_id]->sync_actor, "SYNC_", -1);
|
||||
for (int i = 0; i < NUM_DL_ACTORS; i++) {
|
||||
init_actor(&UE[CC_id]->dl_actors[i], "DL_", -1);
|
||||
if (get_nrUE_params()->num_dl_actors > 0) {
|
||||
UE[CC_id]->dl_actors = calloc_or_fail(get_nrUE_params()->num_dl_actors, sizeof(*UE[CC_id]->dl_actors));
|
||||
for (int i = 0; i < get_nrUE_params()->num_dl_actors; i++) {
|
||||
init_actor(&UE[CC_id]->dl_actors[i], "DL_", -1);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < NUM_UL_ACTORS; i++) {
|
||||
init_actor(&UE[CC_id]->ul_actors[i], "UL_", -1);
|
||||
if (get_nrUE_params()->num_ul_actors > 0) {
|
||||
UE[CC_id]->ul_actors = calloc_or_fail(get_nrUE_params()->num_ul_actors, sizeof(*UE[CC_id]->ul_actors));
|
||||
for (int i = 0; i < get_nrUE_params()->num_ul_actors; i++) {
|
||||
init_actor(&UE[CC_id]->ul_actors[i], "UL_", -1);
|
||||
}
|
||||
}
|
||||
init_nr_ue_vars(UE[CC_id], inst);
|
||||
|
||||
@@ -576,10 +582,10 @@ int main(int argc, char **argv)
|
||||
for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
PHY_VARS_NR_UE *phy_vars = PHY_vars_UE_g[0][CC_id];
|
||||
if (phy_vars) {
|
||||
for (int i = 0; i < NUM_UL_ACTORS; i++) {
|
||||
for (int i = 0; i < get_nrUE_params()->num_ul_actors; i++) {
|
||||
shutdown_actor(&phy_vars->ul_actors[i]);
|
||||
}
|
||||
for (int i = 0; i < NUM_DL_ACTORS; i++) {
|
||||
for (int i = 0; i < get_nrUE_params()->num_dl_actors; i++) {
|
||||
shutdown_actor(&phy_vars->dl_actors[i]);
|
||||
}
|
||||
int ret = pthread_join(phy_vars->main_thread, NULL);
|
||||
|
||||
@@ -22,7 +22,8 @@ extern uint16_t ue_id_g;
|
||||
#define CONFIG_HLP_FREQ_SYNC_I "coefficient for Integrating part of continuous frequency offset compensation PI controller\n"
|
||||
#define CONFIG_HLP_CONT_FO_COMP "Enable continuous frequency offset (FO) estimation and compensation and specify main FO source (1 = local oscillator, 2 = Doppler shift)\n"
|
||||
#define CONFIG_HLP_AGC "Rx Gain control used for UE\n"
|
||||
#define CONFIG_HLP_NUM_UL_ACTORS "Number of UL actors to use. Set to 0 to use the default value\n"
|
||||
#define CONFIG_HLP_NUM_UL_ACTORS "Number of UL actors to use. Set to 0 to disable UL actor framework and do processing inline\n"
|
||||
#define CONFIG_HLP_NUM_DL_ACTORS "Number of DL actors to use. Set to 0 to disable DL actor framework and do processing inline\n"
|
||||
|
||||
/***************************************************************************************************************************************/
|
||||
/* command line options definitions, CMDLINE_XXXX_DESC macros are used to initialize paramdef_t arrays which are then used as argument
|
||||
@@ -78,7 +79,8 @@ extern uint16_t ue_id_g;
|
||||
{"freq-sync-I", CONFIG_HLP_FREQ_SYNC_I, 0, .dblptr=&(nrUE_params.freq_sync_I), .defdblval=0.001, TYPE_DOUBLE, 0}, \
|
||||
{"cont-fo-comp", CONFIG_HLP_CONT_FO_COMP, 0, .iptr=&(nrUE_params.cont_fo_comp), .defintval=0, TYPE_INT, 0}, \
|
||||
{"agc", CONFIG_HLP_AGC, PARAMFLAG_BOOL, .iptr=&(nrUE_params.agc), .defintval=0, TYPE_INT, 0}, \
|
||||
{"num-ul-actors", CONFIG_HLP_NUM_UL_ACTORS, 0, .iptr=&nrUE_params.num_ul_actors, .defintval=0, TYPE_INT, 0}, \
|
||||
{"num-ul-actors", CONFIG_HLP_NUM_UL_ACTORS, 0, .iptr=&nrUE_params.num_ul_actors, .defintval=2, TYPE_INT, 0}, \
|
||||
{"num-dl-actors", CONFIG_HLP_NUM_DL_ACTORS, 0, .iptr=&nrUE_params.num_dl_actors, .defintval=4, TYPE_INT, 0}, \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
@@ -119,6 +121,7 @@ typedef struct {
|
||||
int vcdflag;
|
||||
int tx_max_power;
|
||||
int num_ul_actors;
|
||||
int num_dl_actors;
|
||||
} nrUE_params_t;
|
||||
extern uint64_t get_nrUE_optmask(void);
|
||||
extern uint64_t set_nrUE_optmask(uint64_t bitmask);
|
||||
|
||||
925
h --set-upstream origin ldpc_decoder_cuda
Normal file
925
h --set-upstream origin ldpc_decoder_cuda
Normal file
@@ -0,0 +1,925 @@
|
||||
[31morigin/128-ues[m
|
||||
[31morigin/2021.w46-SnT[m
|
||||
[31morigin/2024.w02-r2lab[m
|
||||
[31morigin/2024.w21+ARC1.5[m
|
||||
[31morigin/207-feature-ued-platform-support[m
|
||||
[31morigin/2cw_fairRRscd[m
|
||||
[31morigin/340-fix-beamforming-for-multiple-antenna[m
|
||||
[31morigin/342-isip-pcie-lib[m
|
||||
[31morigin/375-syrtem-sdr-platform[m
|
||||
[31morigin/387-fraunhofer-iis-transmission-mode-4[m
|
||||
[31morigin/3GPP_TTCN_System_Simulator[m
|
||||
[31morigin/464-ru_beamforming_in_gpu[m
|
||||
[31morigin/464-ru_beamforming_in_gpu-CPUsubfunction[m
|
||||
[31morigin/545-build_oai-d-not-working-for-phy_simulators[m
|
||||
[31morigin/546-segv-in-nr_decode_pucch0-uci_stats-first_uci_stats-uci_stats-rnti[m
|
||||
[31morigin/5G-NSA-Configuration-WithEPC[m
|
||||
[31morigin/5g_fapi_scf[m
|
||||
[31morigin/602-ldpc-decoder-enhancements[m
|
||||
[31morigin/604-ldpc-decoder-further-enhancements[m
|
||||
[31morigin/626-nrqtscope-segv-with-nr-uesoftmodem-dqt-on-centos-stream-8[m
|
||||
[31morigin/965-ssb-frequency-at-gnb-sa-band78-fr1-24prb-usrpb210-conf-is-invalid[m
|
||||
[31morigin/ARC1.6_integration[m
|
||||
[31morigin/Aerial_Integration-ci-log-collection-modif[m
|
||||
[31morigin/Aerial_Integration_23-4[m
|
||||
[31morigin/Aerial_Integration_CI_Test[m
|
||||
[31morigin/Aerial_Integration_CI_modif[m
|
||||
[31morigin/Aerial_Integration_cudu[m
|
||||
[31morigin/Aerial_integration_bugfix_TBS[m
|
||||
[31morigin/Aerial_integration_bugfix_TBS_rebase[m
|
||||
[31morigin/Alireza.najafzadeh-develop-patch-43839[m
|
||||
[31morigin/CG[m
|
||||
[31morigin/CI-enabling-2layerdlmimo[m
|
||||
[31morigin/CI-improve-filename[m
|
||||
[31morigin/CI_update_test_requirements[m
|
||||
[31morigin/CSI-SA[m
|
||||
[31morigin/F1C_extensions[m
|
||||
[31morigin/F1C_extensions_develop[m
|
||||
[31morigin/F1_interop_ACC_n78_for_MR[m
|
||||
[31morigin/FAPI_nFAPI_cleanup[m
|
||||
[31morigin/FR2_NSA[m
|
||||
[31morigin/FR2_NSA-Rebase3-Demo[m
|
||||
[31morigin/FR2_NSA_rebase[m
|
||||
[31morigin/FR2_NSA_rebase2[m
|
||||
[31morigin/Fix-issue-769[m
|
||||
[31morigin/Fix_DedicatedBWPs[m
|
||||
[31morigin/HEAD[m -> origin/develop
|
||||
[31morigin/Handle_S-TMSI_Random_Value_Match[m
|
||||
[31morigin/IAB-Eurecom[m
|
||||
[31morigin/IISC_XN_Config[m
|
||||
[31morigin/IISc_XnSetup[m
|
||||
[31morigin/IISc_XnSetup1[m
|
||||
[31morigin/IISc_XnSetup_final[m
|
||||
[31morigin/IISc_Xn_Config[m
|
||||
[31morigin/IISc_Xn_HO[m
|
||||
[31morigin/IISc_pathloss[m
|
||||
[31morigin/L1_TX_level_config[m
|
||||
[31morigin/LDPC_decoder_rate_fix[m
|
||||
[31morigin/LTE-Srs[m
|
||||
[31morigin/LTE-sidelink[m
|
||||
[31morigin/LTE_TRX_on_single_port[m
|
||||
[31morigin/LatSeq_5GSA_UE[m
|
||||
[31morigin/MWC24-Demo[m
|
||||
[31morigin/Multi_TDD_Pattern[m
|
||||
[31morigin/N2_HO_Source_gNB[m
|
||||
[31morigin/N2_HO_Target_gNB[m
|
||||
[31morigin/NCTU_CS_ISIP[m
|
||||
[31morigin/NCTU_CS_ISIP_CPU[m
|
||||
[31morigin/NCTU_CS_ISIP_GPU[m
|
||||
[31morigin/NCTU_OpinConnect_Beamforming_ISIP[m
|
||||
[31morigin/NCTU_OpinConnect_nFAPI_ISIP[m
|
||||
[31morigin/NRPPA_Procedures[m
|
||||
[31morigin/NRPPA_Procedures_Florian[m
|
||||
[31morigin/NRPPA_Procedures_firstpeak[m
|
||||
[31morigin/NRPPA_Procedures_multi_mqtt[m
|
||||
[31morigin/NR_DLUL_PF_4UL[m
|
||||
[31morigin/NR_FAPI_beamindex_SSB_RO_SEMPROJ[m
|
||||
[31morigin/NR_MAC_Improve_RNTI_selection[m
|
||||
[31morigin/NR_MAC_Multi_Rach_GlobalEdge-old[m
|
||||
[31morigin/NR_MAC_SSB_RO_merge[m
|
||||
[31morigin/NR_MAX_MIMO_LAYERS[m
|
||||
[31morigin/NR_NGAP[m
|
||||
[31morigin/NR_NTN_ulsyncduration[m
|
||||
[31morigin/NR_PDCP_noS1[m
|
||||
[31morigin/NR_RRCConfiguration_S1U[m
|
||||
[31morigin/NR_RRC_CP_bugfix[m
|
||||
[31morigin/NR_RRC_CSI_RS_improv[m
|
||||
[31morigin/NR_RRC_PDCP[m
|
||||
[31morigin/NR_RRC_PUSCH[m
|
||||
[31morigin/NR_RRC_UE_fallback_to_Setup_from_Reestablishment[m
|
||||
[31morigin/NR_RRC_X2AP_AMBR_Change_Global_edge[m
|
||||
[31morigin/NR_RRC_config_simplified[m
|
||||
[31morigin/NR_RRC_harq[m
|
||||
[31morigin/NR_RRC_harq_b[m
|
||||
[31morigin/NR_RRC_harq_newdcipdu[m
|
||||
[31morigin/NR_RRC_using_uid[m
|
||||
[31morigin/NR_SA_F1AP_5GRECORDS[m
|
||||
[31morigin/NR_SA_F1AP_RFSIMULATOR[m
|
||||
[31morigin/NR_SA_F1AP_RFSIMULATOR2[m
|
||||
[31morigin/NR_SA_F1AP_RFSIMULATOR2_SRB[m
|
||||
[31morigin/NR_SA_F1AP_RFSIMULATOR3_tmp[m
|
||||
[31morigin/NR_SA_F1AP_RFSIMULATOR3_wf[m
|
||||
[31morigin/NR_SA_F1AP_RFSIMULATOR_w5GCN[m
|
||||
[31morigin/NR_SA_F1AP_dev[m
|
||||
[31morigin/NR_SA_NGAP_RRC[m
|
||||
[31morigin/NR_SA_fix_pdu_sessions[m
|
||||
[31morigin/NR_SA_w5GCN_new_gtpu[m
|
||||
[31morigin/NR_SL_PSBCH[m
|
||||
[31morigin/NR_SL_PSBCH_2[m
|
||||
[31morigin/NR_SRB_Config[m
|
||||
[31morigin/NR_Slicing_2023_w27[m
|
||||
[31morigin/NR_TCI_states[m
|
||||
[31morigin/NR_TRX_on_single_port[m
|
||||
[31morigin/NR_TRX_on_single_port2[m
|
||||
[31morigin/NR_UE_AGC_ULPC[m
|
||||
[31morigin/NR_UE_PUCCH_scheduling_improvements[m
|
||||
[31morigin/NR_UE_SSB_meas[m
|
||||
[31morigin/NR_UE_at_cmd[m
|
||||
[31morigin/NR_UE_create_iptun_sdap[m
|
||||
[31morigin/NR_UE_csi_refactor[m
|
||||
[31morigin/NR_UE_enable_parallelization[m
|
||||
[31morigin/NR_UE_fix_nas_count[m
|
||||
[31morigin/NR_UE_fix_sib1_config[m
|
||||
[31morigin/NR_UE_fix_tdd_config[m
|
||||
[31morigin/NR_UE_mthread_rx_proc_tx_wait[m
|
||||
[31morigin/NR_UE_multi_pdu[m
|
||||
[31morigin/NR_UE_pbch_symbol_based_proc[m
|
||||
[31morigin/NR_UE_pdcch_symbol_based_proc[m
|
||||
[31morigin/NR_UE_pdsch_meas[m
|
||||
[31morigin/NR_UE_pdsch_only_proc_refator[m
|
||||
[31morigin/NR_UE_pdsch_proc_refactor[m
|
||||
[31morigin/NR_UE_pdsch_proc_refactor_rebase[m
|
||||
[31morigin/NR_UE_phy_refactor_rx[m
|
||||
[31morigin/NR_UE_prs_refactor[m
|
||||
[31morigin/NR_UE_reworking_UCI_mac_pdu_fix[m
|
||||
[31morigin/NR_UE_reworking_UCI_sr_bsr[m
|
||||
[31morigin/NR_UE_slot_fep_cleanup[m
|
||||
[31morigin/NR_UE_tx_perf_meas[m
|
||||
[31morigin/NR_ULSCH_noise_improvements[m
|
||||
[31morigin/NR_UL_FAPI_programming[m
|
||||
[31morigin/NR_Wireshark[m
|
||||
[31morigin/NR_analog_DAS[m
|
||||
[31morigin/NR_bands_fix[m
|
||||
[31morigin/NR_beam_simulation[m
|
||||
[31morigin/NR_beamforming_test[m
|
||||
[31morigin/NR_common_L1[m
|
||||
[31morigin/NR_fix_tpmi_ctnd[m
|
||||
[31morigin/NR_gNB_UE_lists[m
|
||||
[31morigin/NR_gNB_mac_pdu_race_fix[m
|
||||
[31morigin/NR_gNB_replace_tx_reorder_thread[m
|
||||
[31morigin/NR_gNB_reworking_beam_structures2[m
|
||||
[31morigin/NR_ipaccess_testing[m
|
||||
[31morigin/NR_more_than_4_antennas[m
|
||||
[31morigin/NR_msg2_phytest[m
|
||||
[31morigin/NR_rate_matching_assert_race[m
|
||||
[31morigin/NR_scheduling_request3[m
|
||||
[31morigin/NR_slicing_advance[m
|
||||
[31morigin/NR_slicing_sched[m
|
||||
[31morigin/NR_test_S1U_RRC_PRACH_procedures[m
|
||||
[31morigin/NR_ue_dlsch_dmrs_cdm[m
|
||||
[31morigin/NTN_FR2_bands[m
|
||||
[31morigin/NU_CI[m
|
||||
[31morigin/New-Merge-sidelink-develop[m
|
||||
[31morigin/ORAN_FHI[m
|
||||
[31morigin/OpInConnect_ISIP[m
|
||||
[31morigin/OpinConnect_NYCU_NTUST_Beamforming_multi_user[m
|
||||
[31morigin/OpinConnect_NYCU_NTUST_Beamforming_single_user[m
|
||||
[31morigin/OpinConnect_NYCU_NTUST_fpga_ldpc_decoder[m
|
||||
[31morigin/PDU_Session_Handling[m
|
||||
[31morigin/PF_algorithm_extension[m
|
||||
[31morigin/PHR_hanlding[m
|
||||
[31morigin/PerfumeOldTdd[m
|
||||
[31morigin/RA_common_dl_pdus[m
|
||||
[31morigin/RED_ORAN_fhi_integration[m
|
||||
[31morigin/RRC-measurements-merge2develop[m
|
||||
[31morigin/RRC_Measurements[m
|
||||
[31morigin/RU_beam_management[m
|
||||
[31morigin/RX_Conformace_Ulsim_exple[m
|
||||
[31morigin/Remove_Makefiles[m
|
||||
[31morigin/SRB0_iprov[m
|
||||
[31morigin/SRS-meas[m
|
||||
[31morigin/SRS-noise-power[m
|
||||
[31morigin/SRS_multi_symbol[m
|
||||
[31morigin/SRS_rebase[m
|
||||
[31morigin/SnT-enb-ntn-rel-1.0[m
|
||||
[31morigin/TX-optimizations[m
|
||||
[31morigin/USRP_B210_DLSCH_Improvements[m
|
||||
[31morigin/UpdateRANRemoteUEReport[m
|
||||
[31morigin/W11_3GPP_TTCN[m
|
||||
[31morigin/W11_3GPP_TTCN_new[m
|
||||
[31morigin/W20_3GPP_TTCN_Rebased[m
|
||||
[31morigin/X310-Document-Supplement[m
|
||||
[31morigin/accept-pdusession-ipv4v6[m
|
||||
[31morigin/add-ci-ue-rrc-idle-test[m
|
||||
[31morigin/add-dmrs-test[m
|
||||
[31morigin/add-googletest[m
|
||||
[31morigin/add_automated_oai_w_docker_tuto[m
|
||||
[31morigin/add_iris_hw[m
|
||||
[31morigin/adding-logs-for-sync-threads[m
|
||||
[31morigin/aerial_srs[m
|
||||
[31morigin/airbus-app-test-2021[m
|
||||
[31morigin/amd_benchmark[m
|
||||
[31morigin/amf-fqdn-resolve[m
|
||||
[31morigin/arc1.3_integration[m
|
||||
[31morigin/arm5glib[m
|
||||
[31morigin/arm_simd_changy[m
|
||||
[31morigin/armral_dft_prach[m
|
||||
[31morigin/armral_ldpc_coding[m
|
||||
[31morigin/avx512-improvements[m
|
||||
[31morigin/avxllr[m
|
||||
[31morigin/aw2s-n41[m
|
||||
[31morigin/aw2s-ubuntu-fix[m
|
||||
[31morigin/aw2s-ubuntu18[m
|
||||
[31morigin/aw2s_SNcluster[m
|
||||
[31morigin/band1-25prb[m
|
||||
[31morigin/bandwidth-testing[m
|
||||
[31morigin/bandwidth-testing-abs-sr-bsr[m
|
||||
[31morigin/bandwidth-testing-abs-sr-bsr-multiple_ue[m
|
||||
[31morigin/bandwidth-testing-pucch[m
|
||||
[31morigin/bearer-control[m
|
||||
[31morigin/benetel_dpdk20[m
|
||||
[31morigin/benetel_driver_uldl_pf_merge[m
|
||||
[31morigin/benetel_driver_update[m
|
||||
[31morigin/benetel_fixes[m
|
||||
[31morigin/bladerf_testing[m
|
||||
[31morigin/block_mmse_receiver_with_whitenning[m
|
||||
[31morigin/branch-prediction-test[m
|
||||
[31morigin/brf_sdr_work[m
|
||||
[31morigin/bugfix-e1-security[m
|
||||
[31morigin/bugfix-find-uci[m
|
||||
[31morigin/bugfix-ldpc-processing[m
|
||||
[31morigin/bugfix-lte-bad-uecapabilities[m
|
||||
[31morigin/bugfix-nr-ldpc-post-processing[m
|
||||
[31morigin/bugfix-pdcch_order[m
|
||||
[31morigin/bugfix-sdap-socket[m
|
||||
[31morigin/bugfix-t-event-checks[m
|
||||
[31morigin/bupt-sa-merge[m
|
||||
[31morigin/bupt-ulmimo-2[m
|
||||
[31morigin/bupt-ulmimo-3[m
|
||||
[31morigin/cblas-fix[m
|
||||
[31morigin/cce_indexing_fix2[m
|
||||
[31morigin/cell-barred[m
|
||||
[31morigin/channel_estimation_compensation_benchmark[m
|
||||
[31morigin/channelmodelfix[m
|
||||
[31morigin/ci-analyzePing[m
|
||||
[31morigin/ci-asue-test[m
|
||||
[31morigin/ci-aw2s-plmn-change[m
|
||||
[31morigin/ci-aw2s-test-multi-connection[m
|
||||
[31morigin/ci-b200-modif[m
|
||||
[31morigin/ci-change-frequency[m
|
||||
[31morigin/ci-cleanup-ran-py[m
|
||||
[31morigin/ci-cluster-rework-more[m
|
||||
[31morigin/ci-cn5g-yaml-config-real[m
|
||||
[31morigin/ci-cppcheck-new-ssh-class[m
|
||||
[31morigin/ci-deploy-restructure-2[m
|
||||
[31morigin/ci-faraday-new-usrp[m
|
||||
[31morigin/ci-fhi-test-modif[m
|
||||
[31morigin/ci-fhi72-phy-test[m
|
||||
[31morigin/ci-fhi72-phy-test-conf-dramix[m
|
||||
[31morigin/ci-fix-proper-way-to-address-serial-number[m
|
||||
[31morigin/ci-iperf-improvements[m
|
||||
[31morigin/ci-lte-2x2-modif[m
|
||||
[31morigin/ci-mbim-cli[m
|
||||
[31morigin/ci-multi-modifs2[m
|
||||
[31morigin/ci-on-pod[m
|
||||
[31morigin/ci-physim-adjust[m
|
||||
[31morigin/ci-physim-adjust2[m
|
||||
[31morigin/ci-reduce-tested-bitrate[m
|
||||
[31morigin/ci-sa-2x2-adjustment[m
|
||||
[31morigin/ci-swarm-experiment-4g-lte[m
|
||||
[31morigin/ci-tcp-iperf-test[m
|
||||
[31morigin/ci-unify-deploy-methods[m
|
||||
[31morigin/ci-xml-tests-refactoring[m
|
||||
[31morigin/ci-yacine[m
|
||||
[31morigin/ci_benetel_longrun_limits[m
|
||||
[31morigin/ci_bring_test_results_to_dashboard[m
|
||||
[31morigin/ci_fix_bidir[m
|
||||
[31morigin/ci_fix_conditional_gitpost[m
|
||||
[31morigin/ci_fix_docker_cache[m
|
||||
[31morigin/ci_fix_stat_log_concatenation[m
|
||||
[31morigin/ci_nsa_benetel[m
|
||||
[31morigin/ci_rfsim_24PRB_test[m
|
||||
[31morigin/ci_testinfra_as_code[m
|
||||
[31morigin/clang-format-diff-test[m
|
||||
[31morigin/cleanup-pdu-session[m
|
||||
[31morigin/cleanup-t-dependency-cmake[m
|
||||
[31morigin/collect-metrics[m
|
||||
[31morigin/common_functions_to_genrate_fapi[m
|
||||
[31morigin/config-module-leaks[m
|
||||
[31morigin/constant_power[m
|
||||
[31morigin/container_fix[m
|
||||
[31morigin/container_v1.2.2[m
|
||||
[31morigin/cppcheck-fix-wk02[m
|
||||
[31morigin/cppcheck_2023_wk06[m
|
||||
[31morigin/cppcheck_2023_wk06_part1[m
|
||||
[31morigin/cppcheck_2023_wk06_part2[m
|
||||
[31morigin/cpx_benchmark[m
|
||||
[31morigin/create-rrc-to-mac-thread-queue[m
|
||||
[31morigin/ctest_reverse_bits[m
|
||||
[31morigin/cuup-load-tester[m
|
||||
[31morigin/d2ddevelop[m
|
||||
[31morigin/dapp[m
|
||||
[31morigin/data_recording_app[m
|
||||
[31morigin/dcoffset[m
|
||||
[31morigin/dcoffset2[m
|
||||
[31morigin/debug_UL_signal[m
|
||||
[31morigin/debug_branch_init_sync[m
|
||||
[31morigin/debug_pucch_pdu_issue[m
|
||||
[31morigin/detached-w16-test[m
|
||||
[31morigin/develop[m
|
||||
[31morigin/develop-FeMBMS[m
|
||||
[31morigin/develop-Proxy-Integration[m
|
||||
[31morigin/develop-SnT[m
|
||||
[31morigin/develop-aarch64build[m
|
||||
[31morigin/develop-channel-rank[m
|
||||
[31morigin/develop-ci-fju[m
|
||||
[31morigin/develop-hack-nssai[m
|
||||
[31morigin/develop-large-scale-emulations[m
|
||||
[31morigin/develop-m2ap[m
|
||||
[31morigin/develop-meas-report[m
|
||||
[31morigin/develop-measGapConfig[m
|
||||
[31morigin/develop-multi-RRUs[m
|
||||
[31morigin/develop-nb-iot[m
|
||||
[31morigin/develop-nb-iot-merge[m
|
||||
[31morigin/develop-nb-iot-merge-w-conflicts[m
|
||||
[31morigin/develop-nb-iot-ntust[m
|
||||
[31morigin/develop-nr-fr2[m
|
||||
[31morigin/develop-nr-fr2-rework[m
|
||||
[31morigin/develop-oriecpriupdates[m
|
||||
[31morigin/develop-ptrs_symb_idx[m
|
||||
[31morigin/develop-sidekiq[m
|
||||
[31morigin/develop-ue-meas[m
|
||||
[31morigin/develop-vco3[m
|
||||
[31morigin/develop_ci[m
|
||||
[31morigin/develop_inria_ci_deployment[m
|
||||
[31morigin/develop_jenkins_replay[m
|
||||
[31morigin/dfts_alternatives[m
|
||||
[31morigin/dl-nas-transport-len-check[m
|
||||
[31morigin/dlsch_encode_mthread[m
|
||||
[31morigin/dlsch_parallel[m
|
||||
[31morigin/dlsim-autotests[m
|
||||
[31morigin/doc-ci-update[m
|
||||
[31morigin/doc-update[m
|
||||
[31morigin/docker-speedup[m
|
||||
[31morigin/dockerfile-aw2s-rhel-fix[m
|
||||
[31morigin/documentation[m
|
||||
[31morigin/dora_trigger_mac_ra[m
|
||||
[31morigin/drb-f1-e1-modifications[m
|
||||
[31morigin/dreibh/device-load-fix[m
|
||||
[31morigin/dual-connectivity[m
|
||||
[31morigin/dumb-cross-compile[m
|
||||
[31morigin/dytdd[m
|
||||
[31morigin/e1-multiple-cuup-old[m
|
||||
[31morigin/e2-fixes-updates[m
|
||||
[31morigin/e2-rf[m
|
||||
[31morigin/e2ap_flexric_sm[m
|
||||
[31morigin/e2ap_integration[m
|
||||
[31morigin/e2sm[m
|
||||
[31morigin/edrx[m
|
||||
[31morigin/enhancement-149-iqtxshift[m
|
||||
[31morigin/enhancement-logical-channel-reorder[m
|
||||
[31morigin/epiq-sidekiq-gnb-nrue[m
|
||||
[31morigin/episys-clean-pss-sss-psbch[m
|
||||
[31morigin/episys-fix-nsa-mode[m
|
||||
[31morigin/episys-initial-sync-sl[m
|
||||
[31morigin/episys-lte-handover[m
|
||||
[31morigin/episys-lte-ho[m
|
||||
[31morigin/episys-merge-develop-sl[m
|
||||
[31morigin/episys-merge-hardcode-mac-for-sl[m
|
||||
[31morigin/episys-merge-siso-cm[m
|
||||
[31morigin/episys-pss-sss-sl[m
|
||||
[31morigin/episys-pssch-tx-procedures[m
|
||||
[31morigin/episys-sl-dev[m
|
||||
[31morigin/episys-sl-intial-sync[m
|
||||
[31morigin/episys-sl-mode-cleanup[m
|
||||
[31morigin/episys/ea/psfch_configurations[m
|
||||
[31morigin/episys/nsa_baseline[m
|
||||
[31morigin/estimate_srs_multiple_gNBs[m
|
||||
[31morigin/estimate_srs_secondary_gNB_new[m
|
||||
[31morigin/eurecom-episys-merge-from-develop-0828[m
|
||||
[31morigin/eurecom/ea/sl_eurecom2[m
|
||||
[31morigin/eurecom/sl-eurecom2[m
|
||||
[31morigin/experimental[m
|
||||
[31morigin/experimental-20240717[m
|
||||
[31morigin/experimental-20241017[m
|
||||
[31morigin/extract-nr-common[m
|
||||
[31morigin/f1-debug-liteon[m
|
||||
[31morigin/f1-refactor-ue-context[m
|
||||
[31morigin/f1ap-mgmt-msg-encdec-tests[m
|
||||
[31morigin/f1ap_improve[m
|
||||
[31morigin/fapi-wls-integration[m
|
||||
[31morigin/fast-image-build[m
|
||||
[31morigin/fast-u22-build[m
|
||||
[31morigin/feat-mac-sock[m
|
||||
[31morigin/feature-15-carrier_aggregation[m
|
||||
[31morigin/feature-21-TM7[m
|
||||
[31morigin/feature-230-tm3_scheduler[m
|
||||
[31morigin/feature-247-tm89[m
|
||||
[31morigin/feature-247-tm89-fixes[m
|
||||
[31morigin/feature-247-tm89-rebased[m
|
||||
[31morigin/feature-278-physical-layer-GPU-version[m
|
||||
[31morigin/feature-309-phy_procedures_eNB_TX_split_to_multi_threading[m
|
||||
[31morigin/feature-31-ff-scheduler-api[m
|
||||
[31morigin/feature-330-turbo_decoder_gpu[m
|
||||
[31morigin/feature-368-channel-simulator[m
|
||||
[31morigin/feature-39-X2-handover[m
|
||||
[31morigin/feature-ctf-logging[m
|
||||
[31morigin/feature-logjson[m
|
||||
[31morigin/feature-logjson2[m
|
||||
[31morigin/feature-notified-fifo-transports[m
|
||||
[31morigin/feature-pdcp-task[m
|
||||
[31morigin/feature-send-rrc-message-for-wireshark-logging[m
|
||||
[31morigin/feature-system-simulator[m
|
||||
[31morigin/feature-virtual-time[m
|
||||
[31morigin/feature/make-s1-mme-port-configurable-with-astyle-fixes[m
|
||||
[31morigin/feature_configured_grant[m
|
||||
[31morigin/feature_semi_persistent_scheduling[m
|
||||
[31morigin/feature_tm3[m
|
||||
[31morigin/fft-dc-fix[m
|
||||
[31morigin/fft_dynamic_scaling[m
|
||||
[31morigin/fhg-korada-qos-aware-gbr-scheduler[m
|
||||
[31morigin/fhi-container-original[m
|
||||
[31morigin/fhi_phr[m
|
||||
[31morigin/firas[m
|
||||
[31morigin/fix-L1-stats[m
|
||||
[31morigin/fix-SEGV-UE-maxLayers[m
|
||||
[31morigin/fix-barriers[m
|
||||
[31morigin/fix-cblas-ambiguity[m
|
||||
[31morigin/fix-ch_mag-vars-type[m
|
||||
[31morigin/fix-ci-matix[m
|
||||
[31morigin/fix-config-not-set[m
|
||||
[31morigin/fix-dci11-type0[m
|
||||
[31morigin/fix-dedicatedBWP-config[m
|
||||
[31morigin/fix-f1ap-ue-ctxt-setup-pdcp-sn[m
|
||||
[31morigin/fix-issue-727[m
|
||||
[31morigin/fix-msg3-datarace[m
|
||||
[31morigin/fix-n-ta-offset-gnb[m
|
||||
[31morigin/fix-nr-pbchsim[m
|
||||
[31morigin/fix-null-ptr-access[m
|
||||
[31morigin/fix-pucch-ConfigCommon[m
|
||||
[31morigin/fix-realtime[m
|
||||
[31morigin/fix-rfsim-multi-client-out-of-order[m
|
||||
[31morigin/fix-rrc-reest-part-1-gtpu[m
|
||||
[31morigin/fix-scheduling-during-rrc-timer[m
|
||||
[31morigin/fix-segfault-flexran-isolated[m
|
||||
[31morigin/fix-tutorial-documentation[m
|
||||
[31morigin/fix-uninitialised-prach-info[m
|
||||
[31morigin/fix-yaml-cpp-u20[m
|
||||
[31morigin/fix_2_ss_sib1[m
|
||||
[31morigin/fix_NR_DLUL_PF_benchmark[m
|
||||
[31morigin/fix_f1ap_du_gtp_init_on_uecontextsetupreq[m
|
||||
[31morigin/fix_f1ap_uecontextsetup[m
|
||||
[31morigin/fix_nrLDPC_coding_t2[m
|
||||
[31morigin/fix_nr_reestablishment[m
|
||||
[31morigin/fix_ntn_reestablishment[m
|
||||
[31morigin/fix_rb_corruption[m
|
||||
[31morigin/fix_reestablishment[m
|
||||
[31morigin/fix_thread_info_array_size[m
|
||||
[31morigin/fix_ue_groupB_preambles[m
|
||||
[31morigin/fixbuildhelper[m
|
||||
[31morigin/fixes-CE-RLC-PDU-size[m
|
||||
[31morigin/fixes-ho[m
|
||||
[31morigin/fixes-testing-keysight-rusim[m
|
||||
[31morigin/flex[m
|
||||
[31morigin/flex-rnis[m
|
||||
[31morigin/flex-ul[m
|
||||
[31morigin/flexible-interface-naming[m
|
||||
[31morigin/folly-intro[m
|
||||
[31morigin/for_bruno[m
|
||||
[31morigin/fr2-hw-test[m
|
||||
[31morigin/fr2-local-stupix[m
|
||||
[31morigin/fr2-meas[m
|
||||
[31morigin/fr2_testing[m
|
||||
[31morigin/fr2_testing_kb[m
|
||||
[31morigin/frame-handling-gps[m
|
||||
[31morigin/fraunhofer[m
|
||||
[31morigin/fujitsu_contrib_reworked[m
|
||||
[31morigin/fujitsu_lte_contribution[m
|
||||
[31morigin/fujitsu_lte_contribution-128[m
|
||||
[31morigin/fujitsu_nrue_develop[m
|
||||
[31morigin/gNB-nrUE-USRP[m
|
||||
[31morigin/gNB-ptp-sync[m
|
||||
[31morigin/gNB_mwc18_integration[m
|
||||
[31morigin/gNB_ul_optim_aarch64[m
|
||||
[31morigin/generic-tx-in-order[m
|
||||
[31morigin/gnb-fqdn-support[m
|
||||
[31morigin/goa-5g-ntn[m
|
||||
[31morigin/hannover-messe-demo-72[m
|
||||
[31morigin/harq-hotfix[m
|
||||
[31morigin/harq_latency_control[m
|
||||
[31morigin/ho-1CU-2DUs[m
|
||||
[31morigin/ho-neighboring-meas[m
|
||||
[31morigin/ho-ntn-trigger[m
|
||||
[31morigin/hotfix_usrp_lib[m
|
||||
[31morigin/iab-bap-code-mitre[m
|
||||
[31morigin/ieee-testbed-10ues[m
|
||||
[31morigin/iisc_draft[m
|
||||
[31morigin/iisc_xn_ho_sree[m
|
||||
[31morigin/imagebuilder[m
|
||||
[31morigin/implement_logical_channel_prioritization[m
|
||||
[31morigin/improve-pusch-per-symbol-processings[m
|
||||
[31morigin/improvements_timers[m
|
||||
[31morigin/imscope-csv-export[m
|
||||
[31morigin/increase-rlc-buffers[m
|
||||
[31morigin/integ-w13-test-rt-issue[m
|
||||
[31morigin/integration_2025_w23[m
|
||||
[31morigin/integration_w5GC_CBRA_test[m
|
||||
[31morigin/inter-RRU[m
|
||||
[31morigin/inter-RRU-final[m
|
||||
[31morigin/inter-RRU-nr[m
|
||||
[31morigin/inter-RRU-oairu[m
|
||||
[31morigin/inter-gNB-DU-handover[m
|
||||
[31morigin/isip-turbo-decoder-parallel[m
|
||||
[31morigin/isip_nr[m
|
||||
[31morigin/issue-801[m
|
||||
[31morigin/issue-948-debug[m
|
||||
[31morigin/issue-955[m
|
||||
[31morigin/issue271_simulator[m
|
||||
[31morigin/issue392-simplify-s1-nos1step2_01[m
|
||||
[31morigin/issue_851[m
|
||||
[31morigin/issue_927[m
|
||||
[31morigin/itti-dependancies[m
|
||||
[31morigin/iwyu-test-branch[m
|
||||
[31morigin/jf-test[m
|
||||
[31morigin/jf-test-t2[m
|
||||
[31morigin/kharobcom_buildhelper02[m
|
||||
[31morigin/kharofixbuilder[m
|
||||
[31morigin/large_scale_simulations[m
|
||||
[31morigin/latseq[m
|
||||
[31morigin/latseq_5G[m
|
||||
[31morigin/ldpc-aal[m
|
||||
[31morigin/ldpc-dec-layering[m
|
||||
[31morigin/ldpc-decoder-codegen2[m
|
||||
[31morigin/ldpc-decoder-serial-sched[m
|
||||
[31morigin/ldpc-decoder-serial-sched-final[m
|
||||
[31morigin/ldpc-decoder-serial-sched-incremental[m
|
||||
[31morigin/ldpc-offload[m
|
||||
[31morigin/ldpc-offload-xdma-pusch-parallelization[m
|
||||
[31morigin/ldpc-offload-xdma-transport-block[m
|
||||
[31morigin/ldpc_coding_rework_debugging[m
|
||||
[31morigin/ldpc_decoder_cuda[m
|
||||
[31morigin/ldpc_decoder_doc[m
|
||||
[31morigin/ldpc_decoding_module_interface_rework_t2[m
|
||||
[31morigin/ldpc_decoding_module_interface_rework_xdma[m
|
||||
[31morigin/ldpc_enc_avx512_full[m
|
||||
[31morigin/ldpc_enc_avx512_sequential_write[m
|
||||
[31morigin/ldpc_encoder_cuda[m
|
||||
[31morigin/ldpc_interleaving[m
|
||||
[31morigin/ldpc_offload_t1[m
|
||||
[31morigin/ldpc_offload_t1_bis[m
|
||||
[31morigin/ldpc_offload_t1_florian[m
|
||||
[31morigin/ldpc_offload_t1_lcore[m
|
||||
[31morigin/ldpc_offload_t1_mwc[m
|
||||
[31morigin/ldpc_offload_t1_t2[m
|
||||
[31morigin/ldpc_offload_t1_test[m
|
||||
[31morigin/ldpc_offload_t2[m
|
||||
[31morigin/leo-5g-ntn[m
|
||||
[31morigin/liteon_develop_E[m
|
||||
[31morigin/llsc1-docs[m
|
||||
[31morigin/local-dl_info[m
|
||||
[31morigin/logger[m
|
||||
[31morigin/logs-ra-msg4[m
|
||||
[31morigin/lte-2x2-fix[m
|
||||
[31morigin/lte-reestablishment[m
|
||||
[31morigin/lte-tdd6[m
|
||||
[31morigin/lttng-merge[m
|
||||
[31morigin/mac-monitoring[m
|
||||
[31morigin/mac_CellGroupConfig_handling_improvements[m
|
||||
[31morigin/macdpu2wireshark-big-traces[m
|
||||
[31morigin/main[m
|
||||
[31morigin/main_python[m
|
||||
[31morigin/make-ninja-work[m
|
||||
[31morigin/marl-test[m
|
||||
[31morigin/master[m
|
||||
[31morigin/master_large_scale_emulations[m
|
||||
[31morigin/mavenir-interop[m
|
||||
[31morigin/memleak_cppcheck_fix_on_w27_2023[m
|
||||
[31morigin/mep-compatible[m
|
||||
[31morigin/metanoia-mplane[m
|
||||
[31morigin/metanoia-mplane-support[m
|
||||
[31morigin/mex_mmse_receiver[m
|
||||
[31morigin/migrate-vm-pipeline-to-bionic[m
|
||||
[31morigin/mixed_slot_from_conf_json[m
|
||||
[31morigin/mobipass-hack[m
|
||||
[31morigin/modify_fairRRscd_parallel[m
|
||||
[31morigin/more_than_1_rsrp_report[m
|
||||
[31morigin/mosaic5g-oai-ran[m
|
||||
[31morigin/mosaic5g-oai-sim[m
|
||||
[31morigin/mr3034-for-matthias[m
|
||||
[31morigin/msg4-feedback-fix[m
|
||||
[31morigin/msg4_phy_0303_lfq[m
|
||||
[31morigin/mu_allocate[m
|
||||
[31morigin/multi-L1[m
|
||||
[31morigin/multi-RRUs[m
|
||||
[31morigin/multi-du-pass-1[m
|
||||
[31morigin/multi-rach[m
|
||||
[31morigin/multi-ue-experiment-branch[m
|
||||
[31morigin/multi-ue-merge-branch[m
|
||||
[31morigin/multi-ue-phr-merge-w28[m
|
||||
[31morigin/multi-ue-test[m
|
||||
[31morigin/multi-ue-w26[m
|
||||
[31morigin/multi-ue-wip[m
|
||||
[31morigin/multiple_ue[m
|
||||
[31morigin/multiplex_pucch_resource[m
|
||||
[31morigin/mwc2025[m
|
||||
[31morigin/n2-handover[m
|
||||
[31morigin/n2-ho-preparation-work[m
|
||||
[31morigin/nFAPI_P7_Common[m
|
||||
[31morigin/n_ta_fix_with_25_prb_config[m
|
||||
[31morigin/nas-documentation[m
|
||||
[31morigin/nas-multiue-changes[m
|
||||
[31morigin/nas_reg_accept_unit_test[m
|
||||
[31morigin/nb-inst-fix-ru[m
|
||||
[31morigin/netsoft_exp[m
|
||||
[31morigin/new-aarch64-build-cross[m
|
||||
[31morigin/new-tpool-fix[m
|
||||
[31morigin/new_UE_context_improvements_reestablishment[m
|
||||
[31morigin/new_jpn[m
|
||||
[31morigin/new_pdcp[m
|
||||
[31morigin/new_rlc_in_mbms[m
|
||||
[31morigin/nfapi_dump_functions[m
|
||||
[31morigin/ng-initial-req-pdu[m
|
||||
[31morigin/ngap-improvements[m
|
||||
[31morigin/ngap-wf-1120-srb[m
|
||||
[31morigin/ngap-wf-1120-srb-gtp[m
|
||||
[31morigin/no-cellgroup-rrc[m
|
||||
[31morigin/nonzeroKSSB_hotfix[m
|
||||
[31morigin/nonzeroKSSB_hotfix-wk26[m
|
||||
[31morigin/nr-dlsch-thread[m
|
||||
[31morigin/nr-dual-connectivity[m
|
||||
[31morigin/nr-interdigital-test[m
|
||||
[31morigin/nr-ldpc-decoder-improvements[m
|
||||
[31morigin/nr-mac-remove-ue-list[m
|
||||
[31morigin/nr-multi-drb-qos[m
|
||||
[31morigin/nr-pdcp[m
|
||||
[31morigin/nr-pdcp-benchmarking[m
|
||||
[31morigin/nr-pdcp-drop-packets[m
|
||||
[31morigin/nr-pdcp-srb-integrity[m
|
||||
[31morigin/nr-pdsch-extraction-bugfix[m
|
||||
[31morigin/nr-phy-refactor-rebase-progress[m
|
||||
[31morigin/nr-physim-update[m
|
||||
[31morigin/nr-qos-scheduling[m
|
||||
[31morigin/nr-ra-fix[m
|
||||
[31morigin/nr-rlc-pdcp-config-file[m
|
||||
[31morigin/nr-rrc-config-at-mac[m
|
||||
[31morigin/nr-ssb-measurements[m
|
||||
[31morigin/nr-stats-print[m
|
||||
[31morigin/nr-timing-measurement[m
|
||||
[31morigin/nr-ue-buffer-status[m
|
||||
[31morigin/nr-ue-cell-search[m
|
||||
[31morigin/nr-ue-multiple-pdu-sessions[m
|
||||
[31morigin/nr-ue-nas-auth-reject[m
|
||||
[31morigin/nr-ue-nas-sec-mode-reject[m
|
||||
[31morigin/nr-ue-phr-wip[m
|
||||
[31morigin/nr-ue-rest-api[m
|
||||
[31morigin/nr-ue-slot-based[m
|
||||
[31morigin/nr-uldci[m
|
||||
[31morigin/nr_ci_dlsim[m
|
||||
[31morigin/nr_dci_procedures[m
|
||||
[31morigin/nr_demo_wsa2019[m
|
||||
[31morigin/nr_dl_pf[m
|
||||
[31morigin/nr_dlsch_parallel_measurements[m
|
||||
[31morigin/nr_dlsim_multi_ue[m
|
||||
[31morigin/nr_fapi_for_push_tmp[m
|
||||
[31morigin/nr_improve_build_procedures[m
|
||||
[31morigin/nr_improve_chanest[m
|
||||
[31morigin/nr_increase_tp[m
|
||||
[31morigin/nr_mimo_precoding_codebook[m
|
||||
[31morigin/nr_pdsch_integration[m
|
||||
[31morigin/nr_prach[m
|
||||
[31morigin/nr_prs_merge[m
|
||||
[31morigin/nr_pucch[m
|
||||
[31morigin/nr_rru[m
|
||||
[31morigin/nr_rru_memif[m
|
||||
[31morigin/nr_rru_rebased[m
|
||||
[31morigin/nr_segmentation_fixes[m
|
||||
[31morigin/nr_tdd_configuration[m
|
||||
[31morigin/nr_ue_pdu_layer_min[m
|
||||
[31morigin/nr_ul_pf[m
|
||||
[31morigin/nr_ulsim_dlsim_multi_ue[m
|
||||
[31morigin/nr_ulsim_multi_ue[m
|
||||
[31morigin/nr_xlsim_multi_ue[m
|
||||
[31morigin/nrrpa_multignb_handling[m
|
||||
[31morigin/nrue-multi-thread[m
|
||||
[31morigin/nsa-f1-ci[m
|
||||
[31morigin/nsa-ue[m
|
||||
[31morigin/ntn_continuous_sib19_updates[m
|
||||
[31morigin/ntpool[m
|
||||
[31morigin/nu-ci-colosseum-jenkins-update[m
|
||||
[31morigin/nullPointerRedundantCheck_cppcheck_fix[m
|
||||
[31morigin/numDmrsCdmGrpsNoData_fix[m
|
||||
[31morigin/nvs-multi-slice-ue[m
|
||||
[31morigin/o1-integration[m
|
||||
[31morigin/o1-telnet-cu[m
|
||||
[31morigin/o1-telnet-cu-rc-message-copy[m
|
||||
[31morigin/o1e2[m
|
||||
[31morigin/oai-aarch64-benchmarking[m
|
||||
[31morigin/oai-aarch64-benchmarking-beurdouc[m
|
||||
[31morigin/oai-ubuntu-docker[m
|
||||
[31morigin/oai-ubuntu-docker-for-lmssdr[m
|
||||
[31morigin/oai-workshop-summer-2022-cu-du-aw2s[m
|
||||
[31morigin/oai_ue_mwc18_integration[m
|
||||
[31morigin/oaidft_unit_test[m
|
||||
[31morigin/oairu-dockerfile-support[m
|
||||
[31morigin/old-push-parallel-chanest[m
|
||||
[31morigin/onf-sa[m
|
||||
[31morigin/openshift-build-fix[m
|
||||
[31morigin/oran_fhi_k[m
|
||||
[31morigin/oran_jpn[m
|
||||
[31morigin/oran_phnx[m
|
||||
[31morigin/osc-j-release[m
|
||||
[31morigin/packet_seg_flexric_demo[m
|
||||
[31morigin/papi-example[m
|
||||
[31morigin/pdcp-benchmark[m
|
||||
[31morigin/pdsch-debug[m
|
||||
[31morigin/pdsch-dmrs-epre[m
|
||||
[31morigin/pdu-session-release[m
|
||||
[31morigin/pdu_session_rel_complt[m
|
||||
[31morigin/phy_config_mib_frame[m
|
||||
[31morigin/phy_simulators_unit_tests[m
|
||||
[31morigin/physim-hotfix[m
|
||||
[31morigin/pkt_seg_demo[m
|
||||
[31morigin/polar8[m
|
||||
[31morigin/powder-tdd-config2[m
|
||||
[31morigin/power-in-rfsim[m
|
||||
[31morigin/power-in-rfsim-old[m
|
||||
[31morigin/power-reference[m
|
||||
[31morigin/power_management[m
|
||||
[31morigin/prach-fdm-ci[m
|
||||
[31morigin/preamble-selection[m
|
||||
[31morigin/preprocessor_refactor-2[m
|
||||
[31morigin/pucchsim-multiue[m
|
||||
[31morigin/pusch-parallelization[m
|
||||
[31morigin/pusch-retrans-fix-ue[m
|
||||
[31morigin/push_power_conformace_tests[m
|
||||
[31morigin/qoe-e2[m
|
||||
[31morigin/qos-aware-gbr-scheduler[m
|
||||
[31morigin/qos-aware-mac-scheduler[m
|
||||
[31morigin/qos-mac-scheduler[m
|
||||
[31morigin/quectel[m
|
||||
[31morigin/r2lab-aw2s[m
|
||||
[31morigin/radio-if-latency-tool[m
|
||||
[31morigin/rau_rru_reciprocity_measurements[m
|
||||
[31morigin/re_establishment_crash_fix[m
|
||||
[31morigin/rebased-5g-nvs-rc-rf[m
|
||||
[31morigin/reestablishment-int-f1-ue-ids[m
|
||||
[31morigin/refactor-measConfig[m
|
||||
[31morigin/refactor-pdu-session-handling[m
|
||||
[31morigin/refactor_simd_multiplications[m
|
||||
[31morigin/reg-reject-len-check[m
|
||||
[31morigin/reject_UE[m
|
||||
[31morigin/relax-ue-k1k2-assert[m
|
||||
[31morigin/remove-dead-variables[m
|
||||
[31morigin/remove-delta-pucch-nfapi-ue[m
|
||||
[31morigin/remove-legacy-global-and-bad-casts[m
|
||||
[31morigin/remove-pdcp-rlc-locks[m
|
||||
[31morigin/resource-mapping-optim[m
|
||||
[31morigin/revert-2eef5864[m
|
||||
[31morigin/revert_memcpy[m
|
||||
[31morigin/revert_polar_encoder[m
|
||||
[31morigin/rfsim-buildtimes[m
|
||||
[31morigin/rfsim-cleanup[m
|
||||
[31morigin/rfsim-power[m
|
||||
[31morigin/rfsim-pubsub[m
|
||||
[31morigin/rfsim-sync[m
|
||||
[31morigin/rfsim-test-script[m
|
||||
[31morigin/rfsim_speedup[m
|
||||
[31morigin/rhel77-build[m
|
||||
[31morigin/rk_integration[m
|
||||
[31morigin/rk_integration1224[m
|
||||
[31morigin/rk_integration_DDDSUUDDDD[m
|
||||
[31morigin/rlc-test-wip[m
|
||||
[31morigin/rlc-test-wip-2[m
|
||||
[31morigin/rlc_pkt_segmentation_bug[m
|
||||
[31morigin/rlc_testing_rk[m
|
||||
[31morigin/rocky9.1[m
|
||||
[31morigin/rrc-enb-phy-testmode[m
|
||||
[31morigin/rru-rebase-d2[m
|
||||
[31morigin/rru-txwrite-modification[m
|
||||
[31morigin/rssi-threshold-with-logs[m
|
||||
[31morigin/ru-parallel-beamforming[m
|
||||
[31morigin/ru_rau_enhancement[m
|
||||
[31morigin/ru_rau_enhancement-external-timing[m
|
||||
[31morigin/run-process-slot-tx-to-completion[m
|
||||
[31morigin/runel[m
|
||||
[31morigin/runel-reverse-test[m
|
||||
[31morigin/s1-subnormal_rewrite[m
|
||||
[31morigin/s1_subnormal-robert[m
|
||||
[31morigin/sa-msg4[m
|
||||
[31morigin/sa-msg4-rrc[m
|
||||
[31morigin/schedule-si-fix[m
|
||||
[31morigin/scs_60_iisc[m
|
||||
[31morigin/sequans/as_snow3g[m
|
||||
[31morigin/sequans/eap_aka[m
|
||||
[31morigin/shared-memory-iq-channel[m
|
||||
[31morigin/sib19-ue-utilization-message[m
|
||||
[31morigin/sidekiq[m
|
||||
[31morigin/signal-delay[m
|
||||
[31morigin/simd128_for_aarch64[m
|
||||
[31morigin/simd_mod_6_bits[m
|
||||
[31morigin/simde-backup[m
|
||||
[31morigin/single-antenna-chanest-fix[m
|
||||
[31morigin/sl-eurecom[m
|
||||
[31morigin/sl-eurecom2[m
|
||||
[31morigin/sl-eurecom2-rebase[m
|
||||
[31morigin/sl-eurecom3[m
|
||||
[31morigin/sl-eurecom4[m
|
||||
[31morigin/sl_eurecom_integration[m
|
||||
[31morigin/slicing-spring-of-code[m
|
||||
[31morigin/small-config-change[m
|
||||
[31morigin/small-fixes[m
|
||||
[31morigin/smc-auth-check[m
|
||||
[31morigin/softUeConfigs[m
|
||||
[31morigin/split-pdcch-symbol-rx[m
|
||||
[31morigin/split7.2_docker[m
|
||||
[31morigin/srs_e2[m
|
||||
[31morigin/srs_mqtt[m
|
||||
[31morigin/srs_mqtt_dev[m
|
||||
[31morigin/srs_over_sampling[m
|
||||
[31morigin/ssb-freq-suggestions[m
|
||||
[31morigin/stats2[m
|
||||
[31morigin/statsMonitorUpdate[m
|
||||
[31morigin/synchronous-pdcp-rrc[m
|
||||
[31morigin/synchronous-security-keys-processing[m
|
||||
[31morigin/t-traces-jitter[m
|
||||
[31morigin/t2-enc-optim[m
|
||||
[31morigin/t2-encoder-optim[m
|
||||
[31morigin/t2-offload-encoding-testing[m
|
||||
[31morigin/t2-offload-mr4[m
|
||||
[31morigin/t_tracer_extension[m
|
||||
[31morigin/tc-ran[m
|
||||
[31morigin/tcri[m
|
||||
[31morigin/tdd2_5period[m
|
||||
[31morigin/tdd2_5period_withRLCupdate[m
|
||||
[31morigin/telnet-o1-rebase[m
|
||||
[31morigin/telnet-o1-rebase-rs[m
|
||||
[31morigin/telnet_o1_docker[m
|
||||
[31morigin/temp-nr-ue-nas-5g-s-tmsi[m
|
||||
[31morigin/test-5GREC[m
|
||||
[31morigin/test-amarisoft[m
|
||||
[31morigin/test-docker-crash[m
|
||||
[31morigin/test-nsa-benetel[m
|
||||
[31morigin/test-oc1[m
|
||||
[31morigin/test-panos[m
|
||||
[31morigin/test-slice[m
|
||||
[31morigin/test_nitin[m
|
||||
[31morigin/test_nsa_gtpu_fix[m
|
||||
[31morigin/testing-jf[m
|
||||
[31morigin/testing-rk[m
|
||||
[31morigin/testing_with_external_txdata[m
|
||||
[31morigin/thread-pool-test[m
|
||||
[31morigin/thread_pool_contention[m
|
||||
[31morigin/threadpool-improvements[m
|
||||
[31morigin/threadpool-marl[m
|
||||
[31morigin/threadpool-mpmc[m
|
||||
[31morigin/threadpool-with-data-race-fix[m
|
||||
[31morigin/tm7-iris[m
|
||||
[31morigin/tmp-881[m
|
||||
[31morigin/tmp-asn1c-lts[m
|
||||
[31morigin/tmp-resync-5g-s-tmsi[m
|
||||
[31morigin/tmp_amduprofile_source[m
|
||||
[31morigin/tmp_ex[m
|
||||
[31morigin/toa_music[m
|
||||
[31morigin/top-level-oai-standard-lib[m
|
||||
[31morigin/tp-ota-test[m
|
||||
[31morigin/tp_poc[m
|
||||
[31morigin/tp_poc_4[m
|
||||
[31morigin/tp_poc_4_saved[m
|
||||
[31morigin/tpool-new-optimized[m
|
||||
[31morigin/tpool-no-spinlock-semaphore[m
|
||||
[31morigin/tracy-experiment[m
|
||||
[31morigin/trx_write_thread[m
|
||||
[31morigin/tune_ulsim_3gpp_iterations[m
|
||||
[31morigin/ue-avoid-deadlock[m
|
||||
[31morigin/ue-csi[m
|
||||
[31morigin/ue-dci-false-detection[m
|
||||
[31morigin/ue-fapi-transaction-id[m
|
||||
[31morigin/ue-fixes-ota[m
|
||||
[31morigin/ue-integration-new[m
|
||||
[31morigin/ue-integration-new2[m
|
||||
[31morigin/ue-k1k2-assert[m
|
||||
[31morigin/ue-nokia-integration[m
|
||||
[31morigin/ue-nokia-with-refactor[m
|
||||
[31morigin/ue-oran-montreal-demo[m
|
||||
[31morigin/ue-phy-refactor-with-pusch-optim[m
|
||||
[31morigin/ue-race-fix[m
|
||||
[31morigin/ue-remove-global-phyvars[m
|
||||
[31morigin/ue-rrc-coarse-cleaning[m
|
||||
[31morigin/ue-test-public-gnb[m
|
||||
[31morigin/ue-timing-measure[m
|
||||
[31morigin/ue-updates-runel-test[m
|
||||
[31morigin/ue_beam_selection[m
|
||||
[31morigin/ue_calibration[m
|
||||
[31morigin/ue_dlsch_decoding_ldpc_offload[m
|
||||
[31morigin/ues_test_tmp[m
|
||||
[31morigin/uhd_patches[m
|
||||
[31morigin/ul-freq-iq-samps-to-file[m
|
||||
[31morigin/ul-mimo-bupt[m
|
||||
[31morigin/ul_dl_dci_same_slot[m
|
||||
[31morigin/ul_harq[m
|
||||
[31morigin/ulsim_changes[m
|
||||
[31morigin/use-complex-type-in-lte-pucch[m
|
||||
[31morigin/use_msgq[m
|
||||
[31morigin/usrp_gpio_test[m
|
||||
[31morigin/usrp_time_sync[m
|
||||
[31morigin/vcpkg-example[m
|
||||
[31morigin/viavi-testbed[m
|
||||
[31morigin/vrtsim-taps-client[m
|
||||
[31morigin/vvdn_oran_rebase[m
|
||||
[31morigin/websrv_fix[m
|
||||
[31morigin/wf-sa-rrc[m
|
||||
[31morigin/wip-pucch-tx-power[m
|
||||
[31morigin/wk11-with-phytest[m
|
||||
[31morigin/workaround-rebased[m
|
||||
[31morigin/workaround-restart-not-working[m
|
||||
[31morigin/ws_tp[m
|
||||
[31morigin/x2-ho[m
|
||||
[31morigin/x2-ka-test[m
|
||||
[31morigin/x2_neighbor_6cells[m
|
||||
[31morigin/x2_tdd[m
|
||||
[31morigin/xnho_sree_draft[m
|
||||
[31morigin/xran-no-internal-data[m
|
||||
[31morigin/yaml-72[m
|
||||
[31morigin/yaml-config-fix-ipv4[m
|
||||
[31morigin/yaml-config-fixes[m
|
||||
[31morigin/yaml-wip[m
|
||||
@@ -13,6 +13,7 @@ target_link_libraries(coding PRIVATE log_headers)
|
||||
add_library(ldpc_orig MODULE
|
||||
nrLDPC_decoder/nrLDPC_decoder.c
|
||||
nrLDPC_encoder/ldpc_encoder.c
|
||||
nrLDPC_encoder/ldpc_encoder32.c
|
||||
)
|
||||
set_target_properties(ldpc_orig PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
target_link_libraries(ldpc_orig PRIVATE ldpc_segment ldpc_gen_HEADERS)
|
||||
@@ -20,6 +21,7 @@ target_link_libraries(ldpc_orig PRIVATE ldpc_segment ldpc_gen_HEADERS)
|
||||
add_library(ldpc MODULE
|
||||
nrLDPC_decoder/nrLDPC_decoder.c
|
||||
nrLDPC_encoder/ldpc_encoder_optim8segmulti.c
|
||||
nrLDPC_encoder/ldpc_encoder32.c
|
||||
)
|
||||
set_target_properties(ldpc PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
target_link_libraries(ldpc PRIVATE ldpc_segment ldpc_gen_HEADERS)
|
||||
@@ -50,27 +52,73 @@ add_dependencies(ldpc_cl nrLDPC_decoder_kernels_CL)
|
||||
##############################################
|
||||
|
||||
add_boolean_option(ENABLE_LDPC_CUDA OFF "Build support for CUDA" OFF)
|
||||
|
||||
if (ENABLE_LDPC_CUDA)
|
||||
find_package(CUDA REQUIRED)
|
||||
if (NOT CUDA_FOUND)
|
||||
message(FATAL_ERROR "no CUDA found")
|
||||
endif()
|
||||
SET(CUDA_NVCC_FLAG "${CUDA_NVCC_FLAGS};-arch=sm_60;")
|
||||
SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-arch=sm_80;")
|
||||
SET(CUDA_VERBOSE_BUILD ON)
|
||||
cuda_add_library(ldpc_cuda MODULE
|
||||
nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu
|
||||
nrLDPC_encoder/ldpc_encoder_optim8segmulti.c
|
||||
|
||||
# version using NVLink-C2C in Grace Hopper
|
||||
cuda_add_library(ldpc_cuda_GH MODULE
|
||||
# nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu
|
||||
nrLDPC_decoder/kernel_test.cu
|
||||
nrLDPC_decoder/nrLDPC_decoder_cuda_GH.c
|
||||
nrLDPC_encoder/ldpc_encoder_optim8segmulti.c
|
||||
nrLDPC_decoder/nrLDPC_decoder_BG1_cuda.cu
|
||||
nrLDPC_encoder/ldpc_encoder_cuda32.c
|
||||
nrLDPC_encoder/ldpc_BG1_Zc384_32bit.cu
|
||||
# The slot coding layer cannot be linked with
|
||||
# target_link_libraries like above
|
||||
# because of cuda_add_library
|
||||
# which already uses target_link_libraries
|
||||
nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c
|
||||
#nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c
|
||||
nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder_cuda.c
|
||||
nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder_cuda_GH.c
|
||||
nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c
|
||||
nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c
|
||||
)
|
||||
|
||||
target_link_libraries(ldpc_cuda_GH ldpc_gen_HEADERS ${T_LIB})
|
||||
set_target_properties(ldpc_cuda_GH PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
|
||||
set_target_properties(ldpc_cuda_GH PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
add_dependencies(ldpctest ldpc_cuda_GH)
|
||||
add_dependencies(nr-softmodem ldpc_cuda_GH)
|
||||
add_dependencies(nr-uesoftmodem ldpc_cuda_GH)
|
||||
add_dependencies(nr_ulsim ldpc_cuda_GH)
|
||||
add_dependencies(nr_ulschsim ldpc_cuda_GH)
|
||||
add_dependencies(nr_dlsim ldpc_cuda_GH)
|
||||
add_dependencies(nr_dlschsim ldpc_cuda_GH)
|
||||
|
||||
target_compile_definitions(ldpc_cuda_GH PRIVATE USE_CUDA)
|
||||
|
||||
#version using HBM in general GPU
|
||||
cuda_add_library(ldpc_cuda MODULE
|
||||
nrLDPC_decoder/nrLDPC_decoder_cuda.c
|
||||
nrLDPC_decoder/nrLDPC_decoder_BG1_cuda.cu
|
||||
nrLDPC_decoder/kernel_test.cu
|
||||
nrLDPC_encoder/ldpc_encoder_cuda32.c
|
||||
nrLDPC_encoder/ldpc_BG1_Zc384_32bit.cu
|
||||
# The slot coding layer cannot be linked with
|
||||
# target_link_libraries like above
|
||||
# because of cuda_add_library
|
||||
# which already uses target_link_libraries
|
||||
#nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c
|
||||
nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder_cuda.c
|
||||
nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder_cuda.c
|
||||
nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c
|
||||
nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c
|
||||
)
|
||||
set_target_properties(ldpc_cuda PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
|
||||
set_target_properties(ldpc_cuda PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
target_compile_definitions(ldpc_cuda PRIVATE USE_CUDA PARALLEL_STREAM)
|
||||
target_link_libraries(ldpc_cuda ldpc_gen_HEADERS ${T_LIB})
|
||||
target_compile_definitions(ldpctest PRIVATE PARALLEL_STREAM)
|
||||
|
||||
add_dependencies(ldpctest ldpc_cuda)
|
||||
add_dependencies(ldpctest ldpc_cuda)
|
||||
add_dependencies(nr-softmodem ldpc_cuda)
|
||||
add_dependencies(nr-uesoftmodem ldpc_cuda)
|
||||
@@ -78,6 +126,7 @@ if (ENABLE_LDPC_CUDA)
|
||||
add_dependencies(nr_ulschsim ldpc_cuda)
|
||||
add_dependencies(nr_dlsim ldpc_cuda)
|
||||
add_dependencies(nr_dlschsim ldpc_cuda)
|
||||
|
||||
endif()
|
||||
|
||||
add_subdirectory(nrLDPC_coding)
|
||||
|
||||
91
openair1/PHY/CODING/CMakeLists_original.txt
Normal file
91
openair1/PHY/CODING/CMakeLists_original.txt
Normal file
@@ -0,0 +1,91 @@
|
||||
add_library(coding MODULE
|
||||
3gpplte_sse.c
|
||||
3gpplte.c
|
||||
3gpplte_turbo_decoder_sse_8bit.c
|
||||
3gpplte_turbo_decoder_sse_16bit.c
|
||||
3gpplte_turbo_decoder_avx2_16bit.c
|
||||
3gpplte_turbo_decoder.c
|
||||
)
|
||||
set_target_properties(coding PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
#ensure that the T header files are generated before targets depending on them
|
||||
target_link_libraries(coding PRIVATE log_headers)
|
||||
|
||||
add_library(ldpc_orig MODULE
|
||||
nrLDPC_decoder/nrLDPC_decoder.c
|
||||
nrLDPC_encoder/ldpc_encoder.c
|
||||
)
|
||||
set_target_properties(ldpc_orig PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
target_link_libraries(ldpc_orig PRIVATE ldpc_segment ldpc_gen_HEADERS)
|
||||
|
||||
add_library(ldpc MODULE
|
||||
nrLDPC_decoder/nrLDPC_decoder.c
|
||||
nrLDPC_encoder/ldpc_encoder_optim8segmulti.c
|
||||
)
|
||||
set_target_properties(ldpc PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
target_link_libraries(ldpc PRIVATE ldpc_segment ldpc_gen_HEADERS)
|
||||
|
||||
add_dependencies(ldpctest ldpc ldpc_orig)
|
||||
add_dependencies(nr-softmodem ldpc ldpc_orig)
|
||||
add_dependencies(nr-uesoftmodem ldpc ldpc_orig)
|
||||
add_dependencies(nr_ulsim ldpc ldpc_orig)
|
||||
add_dependencies(nr_ulschsim ldpc ldpc_orig)
|
||||
add_dependencies(nr_dlsim ldpc ldpc_orig)
|
||||
add_dependencies(nr_dlschsim ldpc ldpc_orig)
|
||||
|
||||
add_custom_target(nrLDPC_decoder_kernels_CL
|
||||
COMMAND gcc nrLDPC_decoder/nrLDPC_decoder_CL.c -dD -DNRLDPC_KERNEL_SOURCE -E -o ${CMAKE_CURRENT_BINARY_DIR}/nrLDPC_decoder_kernels_CL.clc
|
||||
SOURCES nrLDPC_decoder/nrLDPC_decoder_CL.c
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_library(ldpc_cl MODULE
|
||||
nrLDPC_decoder/nrLDPC_decoder_CL.c
|
||||
nrLDPC_encoder/ldpc_encoder_optim8segmulti.c
|
||||
)
|
||||
set_target_properties(ldpc_cl PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
target_link_libraries(ldpc_cl PRIVATE ldpc_segment OpenCL)
|
||||
add_dependencies(ldpc_cl nrLDPC_decoder_kernels_CL)
|
||||
|
||||
##############################################
|
||||
# Base CUDA setting
|
||||
##############################################
|
||||
|
||||
add_boolean_option(ENABLE_LDPC_CUDA OFF "Build support for CUDA" OFF)
|
||||
if (ENABLE_LDPC_CUDA)
|
||||
find_package(CUDA REQUIRED)
|
||||
if (NOT CUDA_FOUND)
|
||||
message(FATAL_ERROR "no CUDA found")
|
||||
endif()
|
||||
SET(CUDA_NVCC_FLAG "${CUDA_NVCC_FLAGS};-arch=sm_90;")
|
||||
SET(CUDA_VERBOSE_BUILD ON)
|
||||
cuda_add_library(ldpc_cuda MODULE
|
||||
nrLDPC_decoder/nrLDPC_cnProc_BG1_cuda.cu # replaced by the new developing version
|
||||
nrLDPC_encoder/ldpc_encoder_optim8segmulti.c
|
||||
# The slot coding layer cannot be linked with
|
||||
# target_link_libraries like above
|
||||
# because of cuda_add_library
|
||||
# which already uses target_link_libraries
|
||||
nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c
|
||||
nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c
|
||||
nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c
|
||||
)
|
||||
set_target_properties(ldpc_cuda PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
|
||||
set_target_properties(ldpc_cuda PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
add_dependencies(ldpctest ldpc_cuda)
|
||||
add_dependencies(nr-softmodem ldpc_cuda)
|
||||
add_dependencies(nr-uesoftmodem ldpc_cuda)
|
||||
add_dependencies(nr_ulsim ldpc_cuda)
|
||||
add_dependencies(nr_ulschsim ldpc_cuda)
|
||||
add_dependencies(nr_dlsim ldpc_cuda)
|
||||
add_dependencies(nr_dlschsim ldpc_cuda)
|
||||
endif()
|
||||
|
||||
add_subdirectory(nrLDPC_coding)
|
||||
|
||||
if(ENABLE_PHYSIM_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
if (ENABLE_LDPC_CUDA) # if cuda is chosen
|
||||
target_compile_definitions(ldpc_cuda PRIVATE USE_CUDA)
|
||||
endif()
|
||||
@@ -45,6 +45,28 @@
|
||||
#define NR_LDPC_ENABLE_PARITY_CHECK
|
||||
ldpc_interface_t ldpc_orig, ldpc_toCompare;
|
||||
|
||||
static int8_t Failure_Mask[200][MAX_NUM_DLSCH_SEGMENTS] = {0};
|
||||
|
||||
void dumpASS(int8_t* cnProcBufRes, const char* filename)
|
||||
{
|
||||
FILE* fp = fopen(filename, "w");
|
||||
if (fp == NULL) {
|
||||
perror("Failed to open dump file");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
// printf("\nNR_LDPC_SIZE_CN_PROC_BUF: %d\n", NR_LDPC_SIZE_CN_PROC_BUF);
|
||||
|
||||
for (int i = 0; i < MAX_NUM_DLSCH_SEGMENTS*68*384; i++) {
|
||||
fprintf(fp, "%02x ", (uint8_t)cnProcBufRes[i]);
|
||||
if ((i + 1) % 16 == 0)
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
int PARALLEL_PATH = 0;//control decoder path
|
||||
|
||||
// 4-bit quantizer
|
||||
int8_t quantize4bit(double D, double x)
|
||||
{
|
||||
@@ -104,7 +126,9 @@ one_measurement_t test_ldpc(short max_iterations,
|
||||
unsigned char qbits,
|
||||
short Kprime,
|
||||
unsigned int ntrials,
|
||||
int n_segments)
|
||||
int n_segments,
|
||||
int gen_code,
|
||||
int use32bit)
|
||||
{
|
||||
one_measurement_t ret = {0};
|
||||
reset_meas(&ret.time_optim);
|
||||
@@ -121,9 +145,12 @@ one_measurement_t test_ldpc(short max_iterations,
|
||||
cpu_meas_enabled = 1;
|
||||
uint8_t *test_input[MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER * NR_MAX_NB_LAYERS];
|
||||
uint8_t estimated_output[MAX_NUM_DLSCH_SEGMENTS][Kprime];
|
||||
//printf("Output Address: %p\n", estimated_output);
|
||||
memset(estimated_output, 0, sizeof(estimated_output));
|
||||
uint8_t *channel_input[MAX_NUM_DLSCH_SEGMENTS];
|
||||
uint8_t *channel_input_optim;
|
||||
uint32_t channel_input_optim32[4][68*384];
|
||||
|
||||
// double channel_output[68 * 384];
|
||||
double modulated_input[MAX_NUM_DLSCH_SEGMENTS][68 * 384] = {0};
|
||||
int8_t channel_output_fixed[MAX_NUM_DLSCH_SEGMENTS][68 * 384] = {0};
|
||||
@@ -266,8 +293,9 @@ one_measurement_t test_ldpc(short max_iterations,
|
||||
channel_input[j] = malloc16(68 * 384);
|
||||
memset(channel_input[j], 0, 68 * 384);
|
||||
}
|
||||
channel_input_optim = malloc16(68 * 384);
|
||||
memset(channel_input_optim, 0, 68 * 384);
|
||||
channel_input_optim = malloc16(68 * 384 * sizeof(uint32_t));
|
||||
if (use32bit ==0) memset(channel_input_optim, 0, 68 * 384 * sizeof(uint32_t));
|
||||
else memset(channel_input_optim32[0],0,68*384*sizeof(uint32_t));
|
||||
|
||||
// Fill input segments with random values
|
||||
for (int j = 0; j < MAX_NUM_DLSCH_SEGMENTS; j++) {
|
||||
@@ -282,13 +310,16 @@ one_measurement_t test_ldpc(short max_iterations,
|
||||
}
|
||||
|
||||
encoder_implemparams_t impp = {.Zc = Zc, .Kb = Kb, .BG = BG, .K = K};
|
||||
impp.gen_code = 1;
|
||||
|
||||
impp.gen_code = gen_code;
|
||||
impp.tparity = &tparity;
|
||||
impp.tinput = &tinput;
|
||||
impp.toutput = &toutput;
|
||||
if (ntrials == 0)
|
||||
ldpc_orig.LDPCencoder(test_input, channel_input[0], &impp);
|
||||
impp.gen_code = 0;
|
||||
decode_abort_t dec_abort;
|
||||
init_abort(&dec_abort);
|
||||
|
||||
for (int trial = 0; trial < ntrials; trial++) {
|
||||
unsigned int segment_bler = 0;
|
||||
//// encoder
|
||||
@@ -301,26 +332,27 @@ one_measurement_t test_ldpc(short max_iterations,
|
||||
impp.n_segments = n_segments;
|
||||
start_meas(&ret.time_optim);
|
||||
impp.first_seg = 0;
|
||||
ldpc_toCompare.LDPCencoder(test_input, channel_input_optim, &impp);
|
||||
if (use32bit==0) ldpc_toCompare.LDPCencoder(test_input, channel_input_optim, &impp);
|
||||
else ldpc_toCompare.LDPCencoder32(test_input, channel_input_optim32, &impp);
|
||||
stop_meas(&ret.time_optim);
|
||||
|
||||
if (ntrials == 1)
|
||||
for (int j = 0; j < n_segments; j++)
|
||||
for (int i = 0; i < K + (nrows - no_punctured_columns) * Zc - removed_bit; i++) {
|
||||
if (channel_input[j][i] != ((channel_input_optim[i] >> j) & 0x1)) {
|
||||
printf("differ in seg %d pos %d (%u,%u)\n", j, i, channel_input[j][i], (channel_input_optim[i] >> j) & 0x1);
|
||||
return ret;
|
||||
}
|
||||
if (((use32bit == 0) && (channel_input[j][i] != ((channel_input_optim[i] >> j) & 0x1))) || ((use32bit == 1) && (channel_input[j][i] != (((channel_input_optim32[0][i] >> j) & 0x1))))) {
|
||||
printf("differ in seg %d pos %d (%u,%u)\n", j, i, channel_input[j][i], (((uint32_t*)channel_input_optim)[i] >> j) & 0x1);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
int bit;
|
||||
for (int j = 0; j < n_segments; j++) {
|
||||
for (int i = 2 * Zc; i < (Kb + nrows - no_punctured_columns) * Zc - removed_bit; i++) {
|
||||
#ifdef DEBUG_CODER
|
||||
if ((i & 0xf) == 0)
|
||||
printf("\ne %d..%d: ", i, i + 15);
|
||||
#endif
|
||||
|
||||
if (((channel_input_optim[i - 2 * Zc] >> j) & 0x1) == 0)
|
||||
bit = (use32bit==0) ? ((channel_input_optim[i - 2 * Zc] >> j) & 0x1) : ((channel_input_optim32[0][i - 2 * Zc] >> j) & 0x1);
|
||||
if (bit == 0)
|
||||
modulated_input[j][i] = 1.0; /// sqrt(2); //QPSK
|
||||
else
|
||||
modulated_input[j][i] = -1.0; /// sqrt(2);
|
||||
@@ -345,26 +377,41 @@ one_measurement_t test_ldpc(short max_iterations,
|
||||
decParams[j].numMaxIter = max_iterations;
|
||||
decParams[j].outMode = nrLDPC_outMode_BIT;
|
||||
decParams[j].Kprime = Kprime;
|
||||
decParams[j].n_segments = n_segments;
|
||||
decParams[j].LastTrial = (trial == ntrials - 1) ? 1 : 0;
|
||||
|
||||
|
||||
ldpc_toCompare.LDPCinit();
|
||||
}
|
||||
|
||||
//Decoder
|
||||
if(PARALLEL_PATH == 1){
|
||||
start_meas(&ret.time_decoder);
|
||||
set_abort(&dec_abort, false);
|
||||
//printf("Are you here?\n");
|
||||
// printf("n_segments = %d in test\n",n_segments);
|
||||
//dumpASS(channel_output_fixed, "ldpctest_ChannelOutput_stream.txt");
|
||||
n_iter = ldpc_toCompare.LDPCdecoder(&decParams,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(int8_t *)channel_output_fixed,
|
||||
(int8_t *)estimated_output,
|
||||
&decoder_profiler,
|
||||
&dec_abort);
|
||||
stop_meas(&ret.time_decoder);
|
||||
// printf("7:It works here\n");
|
||||
dumpASS(estimated_output, "ldpctest_estimateOutput_stream.txt");
|
||||
|
||||
for (int j = 0; j < n_segments; j++) {
|
||||
start_meas(&ret.time_decoder);
|
||||
set_abort(&dec_abort, false);
|
||||
|
||||
n_iter = ldpc_toCompare.LDPCdecoder(&decParams[j],
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(int8_t *)channel_output_fixed[j],
|
||||
(int8_t *)estimated_output[j],
|
||||
&decoder_profiler,
|
||||
&dec_abort);
|
||||
stop_meas(&ret.time_decoder);
|
||||
|
||||
// count errors
|
||||
//printf("estimated_output[%d] = %p\n", j, &estimated_output[j]);
|
||||
if (memcmp(estimated_output[j], test_input[j], ((Kprime + 7) & ~7) / 8) != 0) {
|
||||
segment_bler++;
|
||||
if(trial < 200){
|
||||
Failure_Mask[trial][j] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < Kprime; i++) {
|
||||
unsigned char estoutputbit = (estimated_output[j][i / 8] & (1 << (i & 7))) >> (i & 7);
|
||||
unsigned char inputbit = (test_input[j][i / 8] & (1 << (i & 7))) >> (i & 7); // Further correct for multiple segments
|
||||
@@ -383,6 +430,49 @@ one_measurement_t test_ldpc(short max_iterations,
|
||||
if (segment_bler != 0)
|
||||
ret.errors++;
|
||||
}
|
||||
|
||||
else{
|
||||
for (int j = 0; j < n_segments; j++) {
|
||||
start_meas(&ret.time_decoder);
|
||||
set_abort(&dec_abort, false);
|
||||
//dumpASS(channel_output_fixed, "ldpctest_ChannelOutput_128.txt");
|
||||
n_iter = ldpc_toCompare.LDPCdecoder(&decParams[j],
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(int8_t *)channel_output_fixed[j],
|
||||
(int8_t *)estimated_output[j],
|
||||
&decoder_profiler,
|
||||
&dec_abort);
|
||||
stop_meas(&ret.time_decoder);
|
||||
|
||||
// count errors
|
||||
if (memcmp(estimated_output[j], test_input[j], ((Kprime + 7) & ~7) / 8) != 0) {
|
||||
segment_bler++;
|
||||
if(trial < 200){
|
||||
Failure_Mask[trial][j] = 1;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < Kprime; i++) {
|
||||
unsigned char estoutputbit = (estimated_output[j][i / 8] & (1 << (i & 7))) >> (i & 7);
|
||||
unsigned char inputbit = (test_input[j][i / 8] & (1 << (i & 7))) >> (i & 7); // Further correct for multiple segments
|
||||
if (estoutputbit != inputbit)
|
||||
ret.errors_bit++;
|
||||
}
|
||||
|
||||
n_iter_mean += n_iter;
|
||||
n_iter_std += pow(n_iter - 1, 2);
|
||||
|
||||
if (n_iter > n_iter_max)
|
||||
n_iter_max = n_iter;
|
||||
|
||||
} // end segments
|
||||
dumpASS(estimated_output, "ldpctest_estimateOutput_cuda128.txt");
|
||||
//dumpASS(test_input, "ldpctest_TestInput_cuda128.txt");
|
||||
if (segment_bler != 0)
|
||||
ret.errors++;
|
||||
}
|
||||
}
|
||||
|
||||
ret.dec_iter.n_iter_mean = n_iter_mean / (double)ntrials / (double)n_segments - 1;
|
||||
ret.dec_iter.n_iter_std =
|
||||
@@ -423,6 +513,7 @@ one_measurement_t test_ldpc(short max_iterations,
|
||||
configmodule_interface_t *uniqCfg = NULL;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
short Kprime = 8448;
|
||||
// default to check output inside ldpc, the NR version checks the outer CRC defined by 3GPP
|
||||
char *ldpc_version = "";
|
||||
@@ -440,19 +531,20 @@ int main(int argc, char *argv[])
|
||||
|
||||
int n_trials = 1;
|
||||
double SNR_step = 0.1;
|
||||
|
||||
randominit(0);
|
||||
int gen_code = 1;
|
||||
randominit(1); // if 1 it selects fixed seed for debugging
|
||||
int test_uncoded = 0;
|
||||
n_iter_stats_t dec_iter[400] = {0};
|
||||
|
||||
short BG = 0, Zc;
|
||||
int use32bit = 0;
|
||||
|
||||
if ((uniqCfg = load_configmodule(argc, argv, CONFIG_ENABLECMDLINEONLY)) == 0) {
|
||||
exit_fun("[LDPCTEST] Error, configuration module init failed\n");
|
||||
}
|
||||
logInit();
|
||||
|
||||
while ((c = getopt(argc, argv, "--:O:q:r:s:S:l:G:n:d:i:t:u:hv:")) != -1) {
|
||||
while ((c = getopt(argc, argv, "--:O:q:r:s:S:l:Gn:d:i:t:u:hv:g:Pn:")) != -1) {
|
||||
/* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */
|
||||
/* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */
|
||||
if (c == 1 || c == '-' || c == 'O')
|
||||
@@ -477,7 +569,14 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case 'G':
|
||||
ldpc_version = "_cuda_GH";
|
||||
use32bit = 1;
|
||||
break;
|
||||
|
||||
case 'P': // stands for "Parallel"
|
||||
ldpc_version = "_cuda";
|
||||
PARALLEL_PATH = 1;
|
||||
use32bit = 1;
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
@@ -506,6 +605,11 @@ int main(int argc, char *argv[])
|
||||
case 'v':
|
||||
ldpc_version = strdup(optarg);
|
||||
break;
|
||||
case 'g':
|
||||
gen_code = atoi(optarg);
|
||||
AssertFatal(gen_code <= 4, "gen_code %d is not allowed\n", gen_code);
|
||||
n_trials = 0;
|
||||
break;
|
||||
case 'h':
|
||||
default:
|
||||
printf("CURRENTLY SUPPORTED CODE RATES: \n");
|
||||
@@ -517,6 +621,7 @@ int main(int argc, char *argv[])
|
||||
printf("-d Denominator rate, (3, 5, 25), Default: 1\n");
|
||||
printf("-l Length of payload bits in a segment (K' in 38.212-5.2.2), [1, 8448], Default: 8448\n");
|
||||
printf("-G give 1 to run cuda for LDPC, Default: 0\n");
|
||||
printf("-P give 1 to run cuda stream parallel for LDPC, Default: 0\n");
|
||||
printf("-n Number of simulation trials, Default: 1\n");
|
||||
// printf("-M MCS2 for TB 2\n");
|
||||
printf("-s SNR per information bit (EbNo) in dB, Default: -2\n");
|
||||
@@ -548,7 +653,7 @@ int main(int argc, char *argv[])
|
||||
"SNR BLER BER UNCODED_BER ENCODER_MEAN ENCODER_STD ENCODER_MAX DECODER_TIME_MEAN DECODER_TIME_STD DECODER_TIME_MAX "
|
||||
"DECODER_ITER_MEAN DECODER_ITER_STD DECODER_ITER_MAX\n");
|
||||
|
||||
for (double SNR = SNR0; SNR < SNR0 + 20.0; SNR += SNR_step) {
|
||||
for (double SNR = SNR0; SNR < SNR0 + 2.0 /*20.0*/; SNR += SNR_step) {
|
||||
double SNR_lin;
|
||||
if (test_uncoded == 1)
|
||||
SNR_lin = pow(10, SNR / 10.0);
|
||||
@@ -562,13 +667,32 @@ int main(int argc, char *argv[])
|
||||
qbits,
|
||||
Kprime, // block length bytes
|
||||
n_trials,
|
||||
n_segments);
|
||||
n_segments,
|
||||
gen_code,
|
||||
use32bit);
|
||||
|
||||
decoded_errors[i] = res.errors;
|
||||
dec_iter[i] = res.dec_iter;
|
||||
dec_iter[i].snr = SNR;
|
||||
dec_iter[i].ber = (float)res.errors_bit / (float)n_trials / (float)Kprime / (double)n_segments;
|
||||
dec_iter[i].bler = (float)decoded_errors[i] / (float)n_trials;
|
||||
printf("Failure Mask = ");
|
||||
for(int i=0; i<n_trials;i++){
|
||||
int flag = 0;
|
||||
for(int j = 0; j < n_segments; j++){
|
||||
if(Failure_Mask[i][j] == 1){
|
||||
if(flag == 0){
|
||||
printf(" %d: ", i);
|
||||
flag = 1;
|
||||
}
|
||||
printf(" %d ", j);
|
||||
Failure_Mask[i][j] = 0;
|
||||
}
|
||||
}
|
||||
if(flag == 1) printf(",");
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
printf("SNR %f, BLER %f (%u/%d)\n", SNR, dec_iter[i].bler, decoded_errors[i], n_trials);
|
||||
printf("SNR %f, BER %f (%u/%d)\n", SNR, dec_iter[i].ber, decoded_errors[i], n_trials);
|
||||
printf("SNR %f, Uncoded BER %f (%u/%d)\n",
|
||||
@@ -583,6 +707,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
double cpu_freq = get_cpu_freq_GHz();
|
||||
time_stats_t *t_optim = &res.time_optim;
|
||||
|
||||
printf("Encoding time mean: %15.3f us\n", (double)t_optim->diff / t_optim->trials / 1000.0 / cpu_freq);
|
||||
printf("Encoding time std: %15.3f us\n",
|
||||
sqrt((double)t_optim->diff_square / t_optim->trials / pow(1000, 2) / pow(cpu_freq, 2)
|
||||
@@ -591,12 +716,19 @@ int main(int argc, char *argv[])
|
||||
printf("\n");
|
||||
|
||||
time_stats_t *t_decoder = &res.time_decoder;
|
||||
if(PARALLEL_PATH){
|
||||
printf("Decoding time mean: %15.3f us (per segment)\n", (double)t_decoder->diff / n_segments /t_decoder->trials / 1000.0 / cpu_freq);
|
||||
printf("Decoding time std: %15.3f us (per segment)\n",
|
||||
sqrt((double)t_decoder->diff_square / t_decoder->trials / pow(n_segments, 2) / pow(1000, 2) / pow(cpu_freq, 2)
|
||||
- pow((double)t_decoder->diff / t_decoder->trials/ n_segments / 1000.0 / cpu_freq, 2)));
|
||||
printf("Decoding time max: %15.3f us (all segments)\n", (double)t_decoder->max / 1000.0 / cpu_freq);
|
||||
}else{
|
||||
printf("Decoding time mean: %15.3f us\n", (double)t_decoder->diff / t_decoder->trials / 1000.0 / cpu_freq);
|
||||
printf("Decoding time std: %15.3f us\n",
|
||||
sqrt((double)t_decoder->diff_square / t_decoder->trials / pow(1000, 2) / pow(cpu_freq, 2)
|
||||
- pow((double)t_decoder->diff / t_decoder->trials / 1000.0 / cpu_freq, 2)));
|
||||
printf("Decoding time max: %15.3f us\n", (double)t_decoder->max / 1000.0 / cpu_freq);
|
||||
|
||||
}
|
||||
fprintf(fd,
|
||||
"%f %f %f %f %f %f %f %f %f %f %f %f %d \n",
|
||||
SNR,
|
||||
|
||||
391
openair1/PHY/CODING/build/CMakeCache.txt
Normal file
391
openair1/PHY/CODING/build/CMakeCache.txt
Normal file
@@ -0,0 +1,391 @@
|
||||
# This is the CMakeCache file.
|
||||
# For build in directory: /home/compmeth/panq/OAI/openairinterface5g/openair1/PHY/CODING/build
|
||||
# It was generated by CMake: /usr/bin/cmake
|
||||
# You can edit this file to change values found and used by cmake.
|
||||
# If you do not want to change any of the values, simply exit the editor.
|
||||
# If you do want to change a value, simply edit, save, and exit the editor.
|
||||
# The syntax for the file is as follows:
|
||||
# KEY:TYPE=VALUE
|
||||
# KEY is the name of a variable in the cache.
|
||||
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
|
||||
# VALUE is the current value for the KEY.
|
||||
|
||||
########################
|
||||
# EXTERNAL cache entries
|
||||
########################
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_AR:FILEPATH=/usr/bin/ar
|
||||
|
||||
//For backwards compatibility, what version of CMake commands and
|
||||
// syntax should this version of CMake try to support.
|
||||
CMAKE_BACKWARDS_COMPATIBILITY:STRING=2.4
|
||||
|
||||
//Choose the type of build, options are: None Debug Release RelWithDebInfo
|
||||
// MinSizeRel ...
|
||||
CMAKE_BUILD_TYPE:STRING=
|
||||
|
||||
//Enable/Disable color output during build.
|
||||
CMAKE_COLOR_MAKEFILE:BOOL=ON
|
||||
|
||||
//CXX compiler
|
||||
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
|
||||
|
||||
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-11
|
||||
|
||||
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-11
|
||||
|
||||
//Flags used by the CXX compiler during all build types.
|
||||
CMAKE_CXX_FLAGS:STRING=
|
||||
|
||||
//Flags used by the CXX compiler during DEBUG builds.
|
||||
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
|
||||
|
||||
//Flags used by the CXX compiler during MINSIZEREL builds.
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
|
||||
|
||||
//Flags used by the CXX compiler during RELEASE builds.
|
||||
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
|
||||
|
||||
//Flags used by the CXX compiler during RELWITHDEBINFO builds.
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
|
||||
|
||||
//C compiler
|
||||
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
|
||||
|
||||
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-11
|
||||
|
||||
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-11
|
||||
|
||||
//Flags used by the C compiler during all build types.
|
||||
CMAKE_C_FLAGS:STRING=
|
||||
|
||||
//Flags used by the C compiler during DEBUG builds.
|
||||
CMAKE_C_FLAGS_DEBUG:STRING=-g
|
||||
|
||||
//Flags used by the C compiler during MINSIZEREL builds.
|
||||
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
|
||||
|
||||
//Flags used by the C compiler during RELEASE builds.
|
||||
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
|
||||
|
||||
//Flags used by the C compiler during RELWITHDEBINFO builds.
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
|
||||
|
||||
//Flags used by the linker during all build types.
|
||||
CMAKE_EXE_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during DEBUG builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during MINSIZEREL builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during RELEASE builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during RELWITHDEBINFO builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Enable/Disable output of compile commands during generation.
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=
|
||||
|
||||
//Install path prefix, prepended onto install directories.
|
||||
CMAKE_INSTALL_PREFIX:PATH=/usr/local
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_LINKER:FILEPATH=/usr/bin/ld
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// all build types.
|
||||
CMAKE_MODULE_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// DEBUG builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// MINSIZEREL builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// RELEASE builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// RELWITHDEBINFO builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_NM:FILEPATH=/usr/bin/nm
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_DESCRIPTION:STATIC=
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_NAME:STATIC=Project
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_READELF:FILEPATH=/usr/bin/readelf
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during all build types.
|
||||
CMAKE_SHARED_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during DEBUG builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during MINSIZEREL builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during RELEASE builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during RELWITHDEBINFO builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//If set, runtime paths are not added when installing shared libraries,
|
||||
// but are added when building.
|
||||
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
|
||||
|
||||
//If set, runtime paths are not added when using shared libraries.
|
||||
CMAKE_SKIP_RPATH:BOOL=NO
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during all build types.
|
||||
CMAKE_STATIC_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during DEBUG builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during MINSIZEREL builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during RELEASE builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during RELWITHDEBINFO builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_STRIP:FILEPATH=/usr/bin/strip
|
||||
|
||||
//If this value is on, makefiles will be generated without the
|
||||
// .SILENT directive, and all commands will be echoed to the console
|
||||
// during the make. This is useful for debugging only. With Visual
|
||||
// Studio IDE projects all commands are done without /nologo.
|
||||
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
|
||||
|
||||
//Single output directory for building all executables.
|
||||
EXECUTABLE_OUTPUT_PATH:PATH=
|
||||
|
||||
//Single output directory for building all libraries.
|
||||
LIBRARY_OUTPUT_PATH:PATH=
|
||||
|
||||
//Value Computed by CMake
|
||||
Project_BINARY_DIR:STATIC=/home/compmeth/panq/OAI/openairinterface5g/openair1/PHY/CODING/build
|
||||
|
||||
//Value Computed by CMake
|
||||
Project_IS_TOP_LEVEL:STATIC=ON
|
||||
|
||||
//Value Computed by CMake
|
||||
Project_SOURCE_DIR:STATIC=/home/compmeth/panq/OAI/openairinterface5g/openair1/PHY/CODING
|
||||
|
||||
//Dependencies for the target
|
||||
coding_LIB_DEPENDS:STATIC=general;log_headers;
|
||||
|
||||
//Dependencies for the target
|
||||
ldpc_LIB_DEPENDS:STATIC=general;ldpc_segment;general;ldpc_gen_HEADERS;
|
||||
|
||||
//Dependencies for the target
|
||||
ldpc_cl_LIB_DEPENDS:STATIC=general;ldpc_segment;general;OpenCL;
|
||||
|
||||
//Dependencies for the target
|
||||
ldpc_orig_LIB_DEPENDS:STATIC=general;ldpc_segment;general;ldpc_gen_HEADERS;
|
||||
|
||||
|
||||
########################
|
||||
# INTERNAL cache entries
|
||||
########################
|
||||
|
||||
//ADVANCED property for variable: CMAKE_ADDR2LINE
|
||||
CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_AR
|
||||
CMAKE_AR-ADVANCED:INTERNAL=1
|
||||
//This is the directory where this CMakeCache.txt was created
|
||||
CMAKE_CACHEFILE_DIR:INTERNAL=/home/compmeth/panq/OAI/openairinterface5g/openair1/PHY/CODING/build
|
||||
//Major version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
|
||||
//Minor version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MINOR_VERSION:INTERNAL=22
|
||||
//Patch version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_PATCH_VERSION:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
|
||||
CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
|
||||
//Path to CMake executable.
|
||||
CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
|
||||
//Path to cpack program executable.
|
||||
CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
|
||||
//Path to ctest program executable.
|
||||
CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER
|
||||
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
|
||||
CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
|
||||
CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS
|
||||
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER
|
||||
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER_AR
|
||||
CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
|
||||
CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS
|
||||
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
|
||||
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
|
||||
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_DLLTOOL
|
||||
CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
|
||||
//Executable file format
|
||||
CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
|
||||
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
|
||||
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
|
||||
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
|
||||
//Name of external makefile project generator.
|
||||
CMAKE_EXTRA_GENERATOR:INTERNAL=
|
||||
//Name of generator.
|
||||
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
|
||||
//Generator instance identifier.
|
||||
CMAKE_GENERATOR_INSTANCE:INTERNAL=
|
||||
//Name of generator platform.
|
||||
CMAKE_GENERATOR_PLATFORM:INTERNAL=
|
||||
//Name of generator toolset.
|
||||
CMAKE_GENERATOR_TOOLSET:INTERNAL=
|
||||
//Source directory with the top level CMakeLists.txt file for this
|
||||
// project
|
||||
CMAKE_HOME_DIRECTORY:INTERNAL=/home/compmeth/panq/OAI/openairinterface5g/openair1/PHY/CODING
|
||||
//Install .so files without execute permission.
|
||||
CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_LINKER
|
||||
CMAKE_LINKER-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
|
||||
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
|
||||
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
|
||||
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_NM
|
||||
CMAKE_NM-ADVANCED:INTERNAL=1
|
||||
//number of local generators
|
||||
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_OBJCOPY
|
||||
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_OBJDUMP
|
||||
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
|
||||
//Platform information initialized
|
||||
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_RANLIB
|
||||
CMAKE_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_READELF
|
||||
CMAKE_READELF-ADVANCED:INTERNAL=1
|
||||
//Path to CMake installation.
|
||||
CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.22
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
|
||||
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
|
||||
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
|
||||
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SKIP_RPATH
|
||||
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
|
||||
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
|
||||
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STRIP
|
||||
CMAKE_STRIP-ADVANCED:INTERNAL=1
|
||||
//uname command
|
||||
CMAKE_UNAME:INTERNAL=/usr/bin/uname
|
||||
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
|
||||
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
|
||||
|
||||
391
openair1/PHY/CODING/build_ldpc/CMakeCache.txt
Normal file
391
openair1/PHY/CODING/build_ldpc/CMakeCache.txt
Normal file
@@ -0,0 +1,391 @@
|
||||
# This is the CMakeCache file.
|
||||
# For build in directory: /home/compmeth/panq/OAI/openairinterface5g/openair1/PHY/CODING/build_ldpc
|
||||
# It was generated by CMake: /usr/bin/cmake
|
||||
# You can edit this file to change values found and used by cmake.
|
||||
# If you do not want to change any of the values, simply exit the editor.
|
||||
# If you do want to change a value, simply edit, save, and exit the editor.
|
||||
# The syntax for the file is as follows:
|
||||
# KEY:TYPE=VALUE
|
||||
# KEY is the name of a variable in the cache.
|
||||
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
|
||||
# VALUE is the current value for the KEY.
|
||||
|
||||
########################
|
||||
# EXTERNAL cache entries
|
||||
########################
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_AR:FILEPATH=/usr/bin/ar
|
||||
|
||||
//For backwards compatibility, what version of CMake commands and
|
||||
// syntax should this version of CMake try to support.
|
||||
CMAKE_BACKWARDS_COMPATIBILITY:STRING=2.4
|
||||
|
||||
//Choose the type of build, options are: None Debug Release RelWithDebInfo
|
||||
// MinSizeRel ...
|
||||
CMAKE_BUILD_TYPE:STRING=
|
||||
|
||||
//Enable/Disable color output during build.
|
||||
CMAKE_COLOR_MAKEFILE:BOOL=ON
|
||||
|
||||
//CXX compiler
|
||||
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
|
||||
|
||||
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-11
|
||||
|
||||
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-11
|
||||
|
||||
//Flags used by the CXX compiler during all build types.
|
||||
CMAKE_CXX_FLAGS:STRING=
|
||||
|
||||
//Flags used by the CXX compiler during DEBUG builds.
|
||||
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
|
||||
|
||||
//Flags used by the CXX compiler during MINSIZEREL builds.
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
|
||||
|
||||
//Flags used by the CXX compiler during RELEASE builds.
|
||||
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
|
||||
|
||||
//Flags used by the CXX compiler during RELWITHDEBINFO builds.
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
|
||||
|
||||
//C compiler
|
||||
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
|
||||
|
||||
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-11
|
||||
|
||||
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-11
|
||||
|
||||
//Flags used by the C compiler during all build types.
|
||||
CMAKE_C_FLAGS:STRING=
|
||||
|
||||
//Flags used by the C compiler during DEBUG builds.
|
||||
CMAKE_C_FLAGS_DEBUG:STRING=-g
|
||||
|
||||
//Flags used by the C compiler during MINSIZEREL builds.
|
||||
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
|
||||
|
||||
//Flags used by the C compiler during RELEASE builds.
|
||||
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
|
||||
|
||||
//Flags used by the C compiler during RELWITHDEBINFO builds.
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
|
||||
|
||||
//Flags used by the linker during all build types.
|
||||
CMAKE_EXE_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during DEBUG builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during MINSIZEREL builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during RELEASE builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during RELWITHDEBINFO builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Enable/Disable output of compile commands during generation.
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=
|
||||
|
||||
//Install path prefix, prepended onto install directories.
|
||||
CMAKE_INSTALL_PREFIX:PATH=/usr/local
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_LINKER:FILEPATH=/usr/bin/ld
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// all build types.
|
||||
CMAKE_MODULE_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// DEBUG builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// MINSIZEREL builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// RELEASE builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// RELWITHDEBINFO builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_NM:FILEPATH=/usr/bin/nm
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_DESCRIPTION:STATIC=
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_NAME:STATIC=Project
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_READELF:FILEPATH=/usr/bin/readelf
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during all build types.
|
||||
CMAKE_SHARED_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during DEBUG builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during MINSIZEREL builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during RELEASE builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during RELWITHDEBINFO builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//If set, runtime paths are not added when installing shared libraries,
|
||||
// but are added when building.
|
||||
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
|
||||
|
||||
//If set, runtime paths are not added when using shared libraries.
|
||||
CMAKE_SKIP_RPATH:BOOL=NO
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during all build types.
|
||||
CMAKE_STATIC_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during DEBUG builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during MINSIZEREL builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during RELEASE builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during RELWITHDEBINFO builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_STRIP:FILEPATH=/usr/bin/strip
|
||||
|
||||
//If this value is on, makefiles will be generated without the
|
||||
// .SILENT directive, and all commands will be echoed to the console
|
||||
// during the make. This is useful for debugging only. With Visual
|
||||
// Studio IDE projects all commands are done without /nologo.
|
||||
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
|
||||
|
||||
//Single output directory for building all executables.
|
||||
EXECUTABLE_OUTPUT_PATH:PATH=
|
||||
|
||||
//Single output directory for building all libraries.
|
||||
LIBRARY_OUTPUT_PATH:PATH=
|
||||
|
||||
//Value Computed by CMake
|
||||
Project_BINARY_DIR:STATIC=/home/compmeth/panq/OAI/openairinterface5g/openair1/PHY/CODING/build_ldpc
|
||||
|
||||
//Value Computed by CMake
|
||||
Project_IS_TOP_LEVEL:STATIC=ON
|
||||
|
||||
//Value Computed by CMake
|
||||
Project_SOURCE_DIR:STATIC=/home/compmeth/panq/OAI/openairinterface5g/openair1/PHY/CODING
|
||||
|
||||
//Dependencies for the target
|
||||
coding_LIB_DEPENDS:STATIC=general;log_headers;
|
||||
|
||||
//Dependencies for the target
|
||||
ldpc_LIB_DEPENDS:STATIC=general;ldpc_segment;general;ldpc_gen_HEADERS;
|
||||
|
||||
//Dependencies for the target
|
||||
ldpc_cl_LIB_DEPENDS:STATIC=general;ldpc_segment;general;OpenCL;
|
||||
|
||||
//Dependencies for the target
|
||||
ldpc_orig_LIB_DEPENDS:STATIC=general;ldpc_segment;general;ldpc_gen_HEADERS;
|
||||
|
||||
|
||||
########################
|
||||
# INTERNAL cache entries
|
||||
########################
|
||||
|
||||
//ADVANCED property for variable: CMAKE_ADDR2LINE
|
||||
CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_AR
|
||||
CMAKE_AR-ADVANCED:INTERNAL=1
|
||||
//This is the directory where this CMakeCache.txt was created
|
||||
CMAKE_CACHEFILE_DIR:INTERNAL=/home/compmeth/panq/OAI/openairinterface5g/openair1/PHY/CODING/build_ldpc
|
||||
//Major version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
|
||||
//Minor version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MINOR_VERSION:INTERNAL=22
|
||||
//Patch version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_PATCH_VERSION:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
|
||||
CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
|
||||
//Path to CMake executable.
|
||||
CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
|
||||
//Path to cpack program executable.
|
||||
CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
|
||||
//Path to ctest program executable.
|
||||
CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER
|
||||
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
|
||||
CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
|
||||
CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS
|
||||
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER
|
||||
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER_AR
|
||||
CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
|
||||
CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS
|
||||
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
|
||||
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
|
||||
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_DLLTOOL
|
||||
CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
|
||||
//Executable file format
|
||||
CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
|
||||
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
|
||||
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
|
||||
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
|
||||
//Name of external makefile project generator.
|
||||
CMAKE_EXTRA_GENERATOR:INTERNAL=
|
||||
//Name of generator.
|
||||
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
|
||||
//Generator instance identifier.
|
||||
CMAKE_GENERATOR_INSTANCE:INTERNAL=
|
||||
//Name of generator platform.
|
||||
CMAKE_GENERATOR_PLATFORM:INTERNAL=
|
||||
//Name of generator toolset.
|
||||
CMAKE_GENERATOR_TOOLSET:INTERNAL=
|
||||
//Source directory with the top level CMakeLists.txt file for this
|
||||
// project
|
||||
CMAKE_HOME_DIRECTORY:INTERNAL=/home/compmeth/panq/OAI/openairinterface5g/openair1/PHY/CODING
|
||||
//Install .so files without execute permission.
|
||||
CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_LINKER
|
||||
CMAKE_LINKER-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
|
||||
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
|
||||
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
|
||||
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_NM
|
||||
CMAKE_NM-ADVANCED:INTERNAL=1
|
||||
//number of local generators
|
||||
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_OBJCOPY
|
||||
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_OBJDUMP
|
||||
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
|
||||
//Platform information initialized
|
||||
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_RANLIB
|
||||
CMAKE_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_READELF
|
||||
CMAKE_READELF-ADVANCED:INTERNAL=1
|
||||
//Path to CMake installation.
|
||||
CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.22
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
|
||||
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
|
||||
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
|
||||
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SKIP_RPATH
|
||||
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
|
||||
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
|
||||
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STRIP
|
||||
CMAKE_STRIP-ADVANCED:INTERNAL=1
|
||||
//uname command
|
||||
CMAKE_UNAME:INTERNAL=/usr/bin/uname
|
||||
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
|
||||
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
set(CMAKE_C_COMPILER "/usr/bin/cc")
|
||||
set(CMAKE_C_COMPILER_ARG1 "")
|
||||
set(CMAKE_C_COMPILER_ID "GNU")
|
||||
set(CMAKE_C_COMPILER_VERSION "11.4.0")
|
||||
set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
|
||||
set(CMAKE_C_COMPILER_WRAPPER "")
|
||||
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "17")
|
||||
set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON")
|
||||
set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17;c_std_23")
|
||||
set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
|
||||
set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
|
||||
set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
|
||||
set(CMAKE_C17_COMPILE_FEATURES "c_std_17")
|
||||
set(CMAKE_C23_COMPILE_FEATURES "c_std_23")
|
||||
|
||||
set(CMAKE_C_PLATFORM_ID "Linux")
|
||||
set(CMAKE_C_SIMULATE_ID "")
|
||||
set(CMAKE_C_COMPILER_FRONTEND_VARIANT "")
|
||||
set(CMAKE_C_SIMULATE_VERSION "")
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_AR "/usr/bin/ar")
|
||||
set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-11")
|
||||
set(CMAKE_RANLIB "/usr/bin/ranlib")
|
||||
set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-11")
|
||||
set(CMAKE_LINKER "/usr/bin/ld")
|
||||
set(CMAKE_MT "")
|
||||
set(CMAKE_COMPILER_IS_GNUCC 1)
|
||||
set(CMAKE_C_COMPILER_LOADED 1)
|
||||
set(CMAKE_C_COMPILER_WORKS TRUE)
|
||||
set(CMAKE_C_ABI_COMPILED TRUE)
|
||||
|
||||
set(CMAKE_C_COMPILER_ENV_VAR "CC")
|
||||
|
||||
set(CMAKE_C_COMPILER_ID_RUN 1)
|
||||
set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
|
||||
set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
||||
set(CMAKE_C_LINKER_PREFERENCE 10)
|
||||
|
||||
# Save compiler ABI information.
|
||||
set(CMAKE_C_SIZEOF_DATA_PTR "8")
|
||||
set(CMAKE_C_COMPILER_ABI "ELF")
|
||||
set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN")
|
||||
set(CMAKE_C_LIBRARY_ARCHITECTURE "aarch64-linux-gnu")
|
||||
|
||||
if(CMAKE_C_SIZEOF_DATA_PTR)
|
||||
set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ABI)
|
||||
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_LIBRARY_ARCHITECTURE)
|
||||
set(CMAKE_LIBRARY_ARCHITECTURE "aarch64-linux-gnu")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
|
||||
if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
|
||||
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/usr/lib/gcc/aarch64-linux-gnu/11/include;/usr/local/include;/usr/include/aarch64-linux-gnu;/usr/include")
|
||||
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s")
|
||||
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/aarch64-linux-gnu/11;/usr/lib/aarch64-linux-gnu;/usr/lib;/lib/aarch64-linux-gnu;/lib")
|
||||
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
|
||||
@@ -0,0 +1,83 @@
|
||||
set(CMAKE_CXX_COMPILER "/usr/bin/c++")
|
||||
set(CMAKE_CXX_COMPILER_ARG1 "")
|
||||
set(CMAKE_CXX_COMPILER_ID "GNU")
|
||||
set(CMAKE_CXX_COMPILER_VERSION "11.4.0")
|
||||
set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
|
||||
set(CMAKE_CXX_COMPILER_WRAPPER "")
|
||||
set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "17")
|
||||
set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "ON")
|
||||
set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23")
|
||||
set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
|
||||
set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
|
||||
set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
|
||||
set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
|
||||
set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20")
|
||||
set(CMAKE_CXX23_COMPILE_FEATURES "cxx_std_23")
|
||||
|
||||
set(CMAKE_CXX_PLATFORM_ID "Linux")
|
||||
set(CMAKE_CXX_SIMULATE_ID "")
|
||||
set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "")
|
||||
set(CMAKE_CXX_SIMULATE_VERSION "")
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_AR "/usr/bin/ar")
|
||||
set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-11")
|
||||
set(CMAKE_RANLIB "/usr/bin/ranlib")
|
||||
set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-11")
|
||||
set(CMAKE_LINKER "/usr/bin/ld")
|
||||
set(CMAKE_MT "")
|
||||
set(CMAKE_COMPILER_IS_GNUCXX 1)
|
||||
set(CMAKE_CXX_COMPILER_LOADED 1)
|
||||
set(CMAKE_CXX_COMPILER_WORKS TRUE)
|
||||
set(CMAKE_CXX_ABI_COMPILED TRUE)
|
||||
|
||||
set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
|
||||
|
||||
set(CMAKE_CXX_COMPILER_ID_RUN 1)
|
||||
set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm)
|
||||
set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
||||
|
||||
foreach (lang C OBJC OBJCXX)
|
||||
if (CMAKE_${lang}_COMPILER_ID_RUN)
|
||||
foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS)
|
||||
list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension})
|
||||
endforeach()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(CMAKE_CXX_LINKER_PREFERENCE 30)
|
||||
set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
|
||||
|
||||
# Save compiler ABI information.
|
||||
set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
|
||||
set(CMAKE_CXX_COMPILER_ABI "ELF")
|
||||
set(CMAKE_CXX_BYTE_ORDER "LITTLE_ENDIAN")
|
||||
set(CMAKE_CXX_LIBRARY_ARCHITECTURE "aarch64-linux-gnu")
|
||||
|
||||
if(CMAKE_CXX_SIZEOF_DATA_PTR)
|
||||
set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ABI)
|
||||
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
|
||||
set(CMAKE_LIBRARY_ARCHITECTURE "aarch64-linux-gnu")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
|
||||
if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
|
||||
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include/c++/11;/usr/include/aarch64-linux-gnu/c++/11;/usr/include/c++/11/backward;/usr/lib/gcc/aarch64-linux-gnu/11/include;/usr/local/include;/usr/include/aarch64-linux-gnu;/usr/include")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/aarch64-linux-gnu/11;/usr/lib/aarch64-linux-gnu;/usr/lib;/lib/aarch64-linux-gnu;/lib")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
|
||||
BIN
openair1/PHY/CODING/build_ldpc/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_C.bin
Executable file
BIN
openair1/PHY/CODING/build_ldpc/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_C.bin
Executable file
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
set(CMAKE_HOST_SYSTEM "Linux-6.5.0-1019-nvidia-64k")
|
||||
set(CMAKE_HOST_SYSTEM_NAME "Linux")
|
||||
set(CMAKE_HOST_SYSTEM_VERSION "6.5.0-1019-nvidia-64k")
|
||||
set(CMAKE_HOST_SYSTEM_PROCESSOR "aarch64")
|
||||
|
||||
|
||||
|
||||
set(CMAKE_SYSTEM "Linux-6.5.0-1019-nvidia-64k")
|
||||
set(CMAKE_SYSTEM_NAME "Linux")
|
||||
set(CMAKE_SYSTEM_VERSION "6.5.0-1019-nvidia-64k")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "aarch64")
|
||||
|
||||
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||
|
||||
set(CMAKE_SYSTEM_LOADED 1)
|
||||
@@ -0,0 +1,803 @@
|
||||
#ifdef __cplusplus
|
||||
# error "A C++ compiler has been selected for C."
|
||||
#endif
|
||||
|
||||
#if defined(__18CXX)
|
||||
# define ID_VOID_MAIN
|
||||
#endif
|
||||
#if defined(__CLASSIC_C__)
|
||||
/* cv-qualifiers did not exist in K&R C */
|
||||
# define const
|
||||
# define volatile
|
||||
#endif
|
||||
|
||||
#if !defined(__has_include)
|
||||
/* If the compiler does not have __has_include, pretend the answer is
|
||||
always no. */
|
||||
# define __has_include(x) 0
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number components: V=Version, R=Revision, P=Patch
|
||||
Version date components: YYYY=Year, MM=Month, DD=Day */
|
||||
|
||||
#if defined(__INTEL_COMPILER) || defined(__ICC)
|
||||
# define COMPILER_ID "Intel"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# if defined(__GNUC__)
|
||||
# define SIMULATE_ID "GNU"
|
||||
# endif
|
||||
/* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
|
||||
except that a few beta releases use the old format with V=2021. */
|
||||
# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
|
||||
# if defined(__INTEL_COMPILER_UPDATE)
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
|
||||
# else
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
|
||||
# endif
|
||||
# else
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
|
||||
/* The third version component from --version is an update index,
|
||||
but no macro is provided for it. */
|
||||
# define COMPILER_VERSION_PATCH DEC(0)
|
||||
# endif
|
||||
# if defined(__INTEL_COMPILER_BUILD_DATE)
|
||||
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
|
||||
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
|
||||
# endif
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
# if defined(__GNUC__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
|
||||
# elif defined(__GNUG__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
|
||||
# endif
|
||||
# if defined(__GNUC_MINOR__)
|
||||
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
# endif
|
||||
# if defined(__GNUC_PATCHLEVEL__)
|
||||
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
|
||||
# define COMPILER_ID "IntelLLVM"
|
||||
#if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
#endif
|
||||
#if defined(__GNUC__)
|
||||
# define SIMULATE_ID "GNU"
|
||||
#endif
|
||||
/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
|
||||
* later. Look for 6 digit vs. 8 digit version number to decide encoding.
|
||||
* VVVV is no smaller than the current year when a version is released.
|
||||
*/
|
||||
#if __INTEL_LLVM_COMPILER < 1000000L
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10)
|
||||
#else
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
|
||||
#endif
|
||||
#if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
#endif
|
||||
#if defined(__GNUC__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
|
||||
#elif defined(__GNUG__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
|
||||
#endif
|
||||
#if defined(__GNUC_MINOR__)
|
||||
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
#endif
|
||||
#if defined(__GNUC_PATCHLEVEL__)
|
||||
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
#endif
|
||||
|
||||
#elif defined(__PATHCC__)
|
||||
# define COMPILER_ID "PathScale"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
|
||||
# if defined(__PATHCC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
|
||||
# define COMPILER_ID "Embarcadero"
|
||||
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
|
||||
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
|
||||
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
# define COMPILER_ID "Borland"
|
||||
/* __BORLANDC__ = 0xVRR */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
|
||||
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
|
||||
|
||||
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
|
||||
# define COMPILER_ID "Watcom"
|
||||
/* __WATCOMC__ = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# define COMPILER_ID "OpenWatcom"
|
||||
/* __WATCOMC__ = VVRP + 1100 */
|
||||
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__SUNPRO_C)
|
||||
# define COMPILER_ID "SunPro"
|
||||
# if __SUNPRO_C >= 0x5100
|
||||
/* __SUNPRO_C = 0xVRRP */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
|
||||
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
|
||||
# else
|
||||
/* __SUNPRO_CC = 0xVRP */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
|
||||
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
|
||||
# endif
|
||||
|
||||
#elif defined(__HP_cc)
|
||||
# define COMPILER_ID "HP"
|
||||
/* __HP_cc = VVRRPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
|
||||
|
||||
#elif defined(__DECC)
|
||||
# define COMPILER_ID "Compaq"
|
||||
/* __DECC_VER = VVRRTPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000)
|
||||
|
||||
#elif defined(__IBMC__) && defined(__COMPILER_VER__)
|
||||
# define COMPILER_ID "zOS"
|
||||
/* __IBMC__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
|
||||
|
||||
#elif defined(__ibmxl__) && defined(__clang__)
|
||||
# define COMPILER_ID "XLClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
|
||||
# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
|
||||
|
||||
|
||||
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
|
||||
# define COMPILER_ID "XL"
|
||||
/* __IBMC__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
|
||||
|
||||
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
|
||||
# define COMPILER_ID "VisualAge"
|
||||
/* __IBMC__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
|
||||
|
||||
#elif defined(__NVCOMPILER)
|
||||
# define COMPILER_ID "NVHPC"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
|
||||
# if defined(__NVCOMPILER_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__PGI)
|
||||
# define COMPILER_ID "PGI"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
|
||||
# if defined(__PGIC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_CRAYC)
|
||||
# define COMPILER_ID "Cray"
|
||||
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
|
||||
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
|
||||
|
||||
#elif defined(__TI_COMPILER_VERSION__)
|
||||
# define COMPILER_ID "TI"
|
||||
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
|
||||
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
|
||||
|
||||
#elif defined(__CLANG_FUJITSU)
|
||||
# define COMPILER_ID "FujitsuClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
|
||||
# define COMPILER_VERSION_INTERNAL_STR __clang_version__
|
||||
|
||||
|
||||
#elif defined(__FUJITSU)
|
||||
# define COMPILER_ID "Fujitsu"
|
||||
# if defined(__FCC_version__)
|
||||
# define COMPILER_VERSION __FCC_version__
|
||||
# elif defined(__FCC_major__)
|
||||
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
|
||||
# endif
|
||||
# if defined(__fcc_version)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
|
||||
# elif defined(__FCC_VERSION)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
|
||||
# endif
|
||||
|
||||
|
||||
#elif defined(__ghs__)
|
||||
# define COMPILER_ID "GHS"
|
||||
/* __GHS_VERSION_NUMBER = VVVVRP */
|
||||
# ifdef __GHS_VERSION_NUMBER
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__TINYC__)
|
||||
# define COMPILER_ID "TinyCC"
|
||||
|
||||
#elif defined(__BCC__)
|
||||
# define COMPILER_ID "Bruce"
|
||||
|
||||
#elif defined(__SCO_VERSION__)
|
||||
# define COMPILER_ID "SCO"
|
||||
|
||||
#elif defined(__ARMCC_VERSION) && !defined(__clang__)
|
||||
# define COMPILER_ID "ARMCC"
|
||||
#if __ARMCC_VERSION >= 1000000
|
||||
/* __ARMCC_VERSION = VRRPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
||||
#else
|
||||
/* __ARMCC_VERSION = VRPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
||||
#endif
|
||||
|
||||
|
||||
#elif defined(__clang__) && defined(__apple_build_version__)
|
||||
# define COMPILER_ID "AppleClang"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
|
||||
|
||||
#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
|
||||
# define COMPILER_ID "ARMClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
|
||||
|
||||
#elif defined(__clang__)
|
||||
# define COMPILER_ID "Clang"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
# define COMPILER_ID "GNU"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
|
||||
# if defined(__GNUC_MINOR__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
# endif
|
||||
# if defined(__GNUC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
# define COMPILER_ID "MSVC"
|
||||
/* _MSC_VER = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# if defined(_MSC_FULL_VER)
|
||||
# if _MSC_VER >= 1400
|
||||
/* _MSC_FULL_VER = VVRRPPPPP */
|
||||
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
|
||||
# else
|
||||
/* _MSC_FULL_VER = VVRRPPPP */
|
||||
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
|
||||
# endif
|
||||
# endif
|
||||
# if defined(_MSC_BUILD)
|
||||
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
|
||||
# endif
|
||||
|
||||
#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
|
||||
# define COMPILER_ID "ADSP"
|
||||
#if defined(__VISUALDSPVERSION__)
|
||||
/* __VISUALDSPVERSION__ = 0xVVRRPP00 */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
|
||||
# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
|
||||
#endif
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
||||
# define COMPILER_ID "IAR"
|
||||
# if defined(__VER__) && defined(__ICCARM__)
|
||||
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
|
||||
# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
||||
# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
|
||||
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
|
||||
# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
||||
# endif
|
||||
|
||||
#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
|
||||
# define COMPILER_ID "SDCC"
|
||||
# if defined(__SDCC_VERSION_MAJOR)
|
||||
# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
|
||||
# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
|
||||
# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
|
||||
# else
|
||||
/* SDCC = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(SDCC/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(SDCC % 10)
|
||||
# endif
|
||||
|
||||
|
||||
/* These compilers are either not known or too old to define an
|
||||
identification macro. Try to identify the platform and guess that
|
||||
it is the native compiler. */
|
||||
#elif defined(__hpux) || defined(__hpua)
|
||||
# define COMPILER_ID "HP"
|
||||
|
||||
#else /* unknown compiler */
|
||||
# define COMPILER_ID ""
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
|
||||
#ifdef SIMULATE_ID
|
||||
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
||||
#endif
|
||||
|
||||
#ifdef __QNXNTO__
|
||||
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
||||
#endif
|
||||
|
||||
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
|
||||
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
#endif
|
||||
|
||||
#define STRINGIFY_HELPER(X) #X
|
||||
#define STRINGIFY(X) STRINGIFY_HELPER(X)
|
||||
|
||||
/* Identify known platforms by name. */
|
||||
#if defined(__linux) || defined(__linux__) || defined(linux)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
#elif defined(__MSYS__)
|
||||
# define PLATFORM_ID "MSYS"
|
||||
|
||||
#elif defined(__CYGWIN__)
|
||||
# define PLATFORM_ID "Cygwin"
|
||||
|
||||
#elif defined(__MINGW32__)
|
||||
# define PLATFORM_ID "MinGW"
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
# define PLATFORM_ID "Darwin"
|
||||
|
||||
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
||||
# define PLATFORM_ID "Windows"
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD)
|
||||
# define PLATFORM_ID "FreeBSD"
|
||||
|
||||
#elif defined(__NetBSD__) || defined(__NetBSD)
|
||||
# define PLATFORM_ID "NetBSD"
|
||||
|
||||
#elif defined(__OpenBSD__) || defined(__OPENBSD)
|
||||
# define PLATFORM_ID "OpenBSD"
|
||||
|
||||
#elif defined(__sun) || defined(sun)
|
||||
# define PLATFORM_ID "SunOS"
|
||||
|
||||
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
|
||||
# define PLATFORM_ID "AIX"
|
||||
|
||||
#elif defined(__hpux) || defined(__hpux__)
|
||||
# define PLATFORM_ID "HP-UX"
|
||||
|
||||
#elif defined(__HAIKU__)
|
||||
# define PLATFORM_ID "Haiku"
|
||||
|
||||
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
|
||||
# define PLATFORM_ID "BeOS"
|
||||
|
||||
#elif defined(__QNX__) || defined(__QNXNTO__)
|
||||
# define PLATFORM_ID "QNX"
|
||||
|
||||
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
|
||||
# define PLATFORM_ID "Tru64"
|
||||
|
||||
#elif defined(__riscos) || defined(__riscos__)
|
||||
# define PLATFORM_ID "RISCos"
|
||||
|
||||
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
|
||||
# define PLATFORM_ID "SINIX"
|
||||
|
||||
#elif defined(__UNIX_SV__)
|
||||
# define PLATFORM_ID "UNIX_SV"
|
||||
|
||||
#elif defined(__bsdos__)
|
||||
# define PLATFORM_ID "BSDOS"
|
||||
|
||||
#elif defined(_MPRAS) || defined(MPRAS)
|
||||
# define PLATFORM_ID "MP-RAS"
|
||||
|
||||
#elif defined(__osf) || defined(__osf__)
|
||||
# define PLATFORM_ID "OSF1"
|
||||
|
||||
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
|
||||
# define PLATFORM_ID "SCO_SV"
|
||||
|
||||
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
|
||||
# define PLATFORM_ID "ULTRIX"
|
||||
|
||||
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
|
||||
# define PLATFORM_ID "Xenix"
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(__LINUX__)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
# elif defined(__DOS__)
|
||||
# define PLATFORM_ID "DOS"
|
||||
|
||||
# elif defined(__OS2__)
|
||||
# define PLATFORM_ID "OS2"
|
||||
|
||||
# elif defined(__WINDOWS__)
|
||||
# define PLATFORM_ID "Windows3x"
|
||||
|
||||
# elif defined(__VXWORKS__)
|
||||
# define PLATFORM_ID "VxWorks"
|
||||
|
||||
# else /* unknown platform */
|
||||
# define PLATFORM_ID
|
||||
# endif
|
||||
|
||||
#elif defined(__INTEGRITY)
|
||||
# if defined(INT_178B)
|
||||
# define PLATFORM_ID "Integrity178"
|
||||
|
||||
# else /* regular Integrity */
|
||||
# define PLATFORM_ID "Integrity"
|
||||
# endif
|
||||
|
||||
#else /* unknown platform */
|
||||
# define PLATFORM_ID
|
||||
|
||||
#endif
|
||||
|
||||
/* For windows compilers MSVC and Intel we can determine
|
||||
the architecture of the compiler being used. This is because
|
||||
the compilers do not have flags that can change the architecture,
|
||||
but rather depend on which compiler is being used
|
||||
*/
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
# if defined(_M_IA64)
|
||||
# define ARCHITECTURE_ID "IA64"
|
||||
|
||||
# elif defined(_M_ARM64EC)
|
||||
# define ARCHITECTURE_ID "ARM64EC"
|
||||
|
||||
# elif defined(_M_X64) || defined(_M_AMD64)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# elif defined(_M_ARM64)
|
||||
# define ARCHITECTURE_ID "ARM64"
|
||||
|
||||
# elif defined(_M_ARM)
|
||||
# if _M_ARM == 4
|
||||
# define ARCHITECTURE_ID "ARMV4I"
|
||||
# elif _M_ARM == 5
|
||||
# define ARCHITECTURE_ID "ARMV5I"
|
||||
# else
|
||||
# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
|
||||
# endif
|
||||
|
||||
# elif defined(_M_MIPS)
|
||||
# define ARCHITECTURE_ID "MIPS"
|
||||
|
||||
# elif defined(_M_SH)
|
||||
# define ARCHITECTURE_ID "SHx"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(_M_I86)
|
||||
# define ARCHITECTURE_ID "I86"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
||||
# if defined(__ICCARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__ICCRX__)
|
||||
# define ARCHITECTURE_ID "RX"
|
||||
|
||||
# elif defined(__ICCRH850__)
|
||||
# define ARCHITECTURE_ID "RH850"
|
||||
|
||||
# elif defined(__ICCRL78__)
|
||||
# define ARCHITECTURE_ID "RL78"
|
||||
|
||||
# elif defined(__ICCRISCV__)
|
||||
# define ARCHITECTURE_ID "RISCV"
|
||||
|
||||
# elif defined(__ICCAVR__)
|
||||
# define ARCHITECTURE_ID "AVR"
|
||||
|
||||
# elif defined(__ICC430__)
|
||||
# define ARCHITECTURE_ID "MSP430"
|
||||
|
||||
# elif defined(__ICCV850__)
|
||||
# define ARCHITECTURE_ID "V850"
|
||||
|
||||
# elif defined(__ICC8051__)
|
||||
# define ARCHITECTURE_ID "8051"
|
||||
|
||||
# elif defined(__ICCSTM8__)
|
||||
# define ARCHITECTURE_ID "STM8"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__ghs__)
|
||||
# if defined(__PPC64__)
|
||||
# define ARCHITECTURE_ID "PPC64"
|
||||
|
||||
# elif defined(__ppc__)
|
||||
# define ARCHITECTURE_ID "PPC"
|
||||
|
||||
# elif defined(__ARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__x86_64__)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(__i386__)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__TI_COMPILER_VERSION__)
|
||||
# if defined(__TI_ARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__MSP430__)
|
||||
# define ARCHITECTURE_ID "MSP430"
|
||||
|
||||
# elif defined(__TMS320C28XX__)
|
||||
# define ARCHITECTURE_ID "TMS320C28x"
|
||||
|
||||
# elif defined(__TMS320C6X__) || defined(_TMS320C6X)
|
||||
# define ARCHITECTURE_ID "TMS320C6x"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#else
|
||||
# define ARCHITECTURE_ID
|
||||
#endif
|
||||
|
||||
/* Convert integer to decimal digit literals. */
|
||||
#define DEC(n) \
|
||||
('0' + (((n) / 10000000)%10)), \
|
||||
('0' + (((n) / 1000000)%10)), \
|
||||
('0' + (((n) / 100000)%10)), \
|
||||
('0' + (((n) / 10000)%10)), \
|
||||
('0' + (((n) / 1000)%10)), \
|
||||
('0' + (((n) / 100)%10)), \
|
||||
('0' + (((n) / 10)%10)), \
|
||||
('0' + ((n) % 10))
|
||||
|
||||
/* Convert integer to hex digit literals. */
|
||||
#define HEX(n) \
|
||||
('0' + ((n)>>28 & 0xF)), \
|
||||
('0' + ((n)>>24 & 0xF)), \
|
||||
('0' + ((n)>>20 & 0xF)), \
|
||||
('0' + ((n)>>16 & 0xF)), \
|
||||
('0' + ((n)>>12 & 0xF)), \
|
||||
('0' + ((n)>>8 & 0xF)), \
|
||||
('0' + ((n)>>4 & 0xF)), \
|
||||
('0' + ((n) & 0xF))
|
||||
|
||||
/* Construct a string literal encoding the version number. */
|
||||
#ifdef COMPILER_VERSION
|
||||
char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
|
||||
|
||||
/* Construct a string literal encoding the version number components. */
|
||||
#elif defined(COMPILER_VERSION_MAJOR)
|
||||
char const info_version[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
|
||||
COMPILER_VERSION_MAJOR,
|
||||
# ifdef COMPILER_VERSION_MINOR
|
||||
'.', COMPILER_VERSION_MINOR,
|
||||
# ifdef COMPILER_VERSION_PATCH
|
||||
'.', COMPILER_VERSION_PATCH,
|
||||
# ifdef COMPILER_VERSION_TWEAK
|
||||
'.', COMPILER_VERSION_TWEAK,
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct a string literal encoding the internal version number. */
|
||||
#ifdef COMPILER_VERSION_INTERNAL
|
||||
char const info_version_internal[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
|
||||
'i','n','t','e','r','n','a','l','[',
|
||||
COMPILER_VERSION_INTERNAL,']','\0'};
|
||||
#elif defined(COMPILER_VERSION_INTERNAL_STR)
|
||||
char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
|
||||
#endif
|
||||
|
||||
/* Construct a string literal encoding the version number components. */
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
char const info_simulate_version[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
|
||||
SIMULATE_VERSION_MAJOR,
|
||||
# ifdef SIMULATE_VERSION_MINOR
|
||||
'.', SIMULATE_VERSION_MINOR,
|
||||
# ifdef SIMULATE_VERSION_PATCH
|
||||
'.', SIMULATE_VERSION_PATCH,
|
||||
# ifdef SIMULATE_VERSION_TWEAK
|
||||
'.', SIMULATE_VERSION_TWEAK,
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
|
||||
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
|
||||
|
||||
|
||||
|
||||
#if !defined(__STDC__) && !defined(__clang__)
|
||||
# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__)
|
||||
# define C_VERSION "90"
|
||||
# else
|
||||
# define C_VERSION
|
||||
# endif
|
||||
#elif __STDC_VERSION__ > 201710L
|
||||
# define C_VERSION "23"
|
||||
#elif __STDC_VERSION__ >= 201710L
|
||||
# define C_VERSION "17"
|
||||
#elif __STDC_VERSION__ >= 201000L
|
||||
# define C_VERSION "11"
|
||||
#elif __STDC_VERSION__ >= 199901L
|
||||
# define C_VERSION "99"
|
||||
#else
|
||||
# define C_VERSION "90"
|
||||
#endif
|
||||
const char* info_language_standard_default =
|
||||
"INFO" ":" "standard_default[" C_VERSION "]";
|
||||
|
||||
const char* info_language_extensions_default = "INFO" ":" "extensions_default["
|
||||
/* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */
|
||||
#if (defined(__clang__) || defined(__GNUC__) || \
|
||||
defined(__TI_COMPILER_VERSION__)) && \
|
||||
!defined(__STRICT_ANSI__) && !defined(_MSC_VER)
|
||||
"ON"
|
||||
#else
|
||||
"OFF"
|
||||
#endif
|
||||
"]";
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef ID_VOID_MAIN
|
||||
void main() {}
|
||||
#else
|
||||
# if defined(__CLASSIC_C__)
|
||||
int main(argc, argv) int argc; char *argv[];
|
||||
# else
|
||||
int main(int argc, char* argv[])
|
||||
# endif
|
||||
{
|
||||
int require = 0;
|
||||
require += info_compiler[argc];
|
||||
require += info_platform[argc];
|
||||
require += info_arch[argc];
|
||||
#ifdef COMPILER_VERSION_MAJOR
|
||||
require += info_version[argc];
|
||||
#endif
|
||||
#ifdef COMPILER_VERSION_INTERNAL
|
||||
require += info_version_internal[argc];
|
||||
#endif
|
||||
#ifdef SIMULATE_ID
|
||||
require += info_simulate[argc];
|
||||
#endif
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
require += info_simulate_version[argc];
|
||||
#endif
|
||||
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
|
||||
require += info_cray[argc];
|
||||
#endif
|
||||
require += info_language_standard_default[argc];
|
||||
require += info_language_extensions_default[argc];
|
||||
(void)argv;
|
||||
return require;
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,791 @@
|
||||
/* This source file must have a .cpp extension so that all C++ compilers
|
||||
recognize the extension without flags. Borland does not know .cxx for
|
||||
example. */
|
||||
#ifndef __cplusplus
|
||||
# error "A C compiler has been selected for C++."
|
||||
#endif
|
||||
|
||||
#if !defined(__has_include)
|
||||
/* If the compiler does not have __has_include, pretend the answer is
|
||||
always no. */
|
||||
# define __has_include(x) 0
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number components: V=Version, R=Revision, P=Patch
|
||||
Version date components: YYYY=Year, MM=Month, DD=Day */
|
||||
|
||||
#if defined(__COMO__)
|
||||
# define COMPILER_ID "Comeau"
|
||||
/* __COMO_VERSION__ = VRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100)
|
||||
|
||||
#elif defined(__INTEL_COMPILER) || defined(__ICC)
|
||||
# define COMPILER_ID "Intel"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# if defined(__GNUC__)
|
||||
# define SIMULATE_ID "GNU"
|
||||
# endif
|
||||
/* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
|
||||
except that a few beta releases use the old format with V=2021. */
|
||||
# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
|
||||
# if defined(__INTEL_COMPILER_UPDATE)
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
|
||||
# else
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
|
||||
# endif
|
||||
# else
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
|
||||
/* The third version component from --version is an update index,
|
||||
but no macro is provided for it. */
|
||||
# define COMPILER_VERSION_PATCH DEC(0)
|
||||
# endif
|
||||
# if defined(__INTEL_COMPILER_BUILD_DATE)
|
||||
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
|
||||
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
|
||||
# endif
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
# if defined(__GNUC__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
|
||||
# elif defined(__GNUG__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
|
||||
# endif
|
||||
# if defined(__GNUC_MINOR__)
|
||||
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
# endif
|
||||
# if defined(__GNUC_PATCHLEVEL__)
|
||||
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
|
||||
# define COMPILER_ID "IntelLLVM"
|
||||
#if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
#endif
|
||||
#if defined(__GNUC__)
|
||||
# define SIMULATE_ID "GNU"
|
||||
#endif
|
||||
/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
|
||||
* later. Look for 6 digit vs. 8 digit version number to decide encoding.
|
||||
* VVVV is no smaller than the current year when a version is released.
|
||||
*/
|
||||
#if __INTEL_LLVM_COMPILER < 1000000L
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10)
|
||||
#else
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
|
||||
#endif
|
||||
#if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
#endif
|
||||
#if defined(__GNUC__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
|
||||
#elif defined(__GNUG__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
|
||||
#endif
|
||||
#if defined(__GNUC_MINOR__)
|
||||
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
#endif
|
||||
#if defined(__GNUC_PATCHLEVEL__)
|
||||
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
#endif
|
||||
|
||||
#elif defined(__PATHCC__)
|
||||
# define COMPILER_ID "PathScale"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
|
||||
# if defined(__PATHCC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
|
||||
# define COMPILER_ID "Embarcadero"
|
||||
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
|
||||
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
|
||||
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
# define COMPILER_ID "Borland"
|
||||
/* __BORLANDC__ = 0xVRR */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
|
||||
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
|
||||
|
||||
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
|
||||
# define COMPILER_ID "Watcom"
|
||||
/* __WATCOMC__ = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# define COMPILER_ID "OpenWatcom"
|
||||
/* __WATCOMC__ = VVRP + 1100 */
|
||||
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__SUNPRO_CC)
|
||||
# define COMPILER_ID "SunPro"
|
||||
# if __SUNPRO_CC >= 0x5100
|
||||
/* __SUNPRO_CC = 0xVRRP */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12)
|
||||
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
|
||||
# else
|
||||
/* __SUNPRO_CC = 0xVRP */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8)
|
||||
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
|
||||
# endif
|
||||
|
||||
#elif defined(__HP_aCC)
|
||||
# define COMPILER_ID "HP"
|
||||
/* __HP_aCC = VVRRPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100)
|
||||
|
||||
#elif defined(__DECCXX)
|
||||
# define COMPILER_ID "Compaq"
|
||||
/* __DECCXX_VER = VVRRTPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000)
|
||||
|
||||
#elif defined(__IBMCPP__) && defined(__COMPILER_VER__)
|
||||
# define COMPILER_ID "zOS"
|
||||
/* __IBMCPP__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
|
||||
|
||||
#elif defined(__ibmxl__) && defined(__clang__)
|
||||
# define COMPILER_ID "XLClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
|
||||
# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
|
||||
|
||||
|
||||
#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800
|
||||
# define COMPILER_ID "XL"
|
||||
/* __IBMCPP__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
|
||||
|
||||
#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800
|
||||
# define COMPILER_ID "VisualAge"
|
||||
/* __IBMCPP__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
|
||||
|
||||
#elif defined(__NVCOMPILER)
|
||||
# define COMPILER_ID "NVHPC"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
|
||||
# if defined(__NVCOMPILER_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__PGI)
|
||||
# define COMPILER_ID "PGI"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
|
||||
# if defined(__PGIC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_CRAYC)
|
||||
# define COMPILER_ID "Cray"
|
||||
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
|
||||
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
|
||||
|
||||
#elif defined(__TI_COMPILER_VERSION__)
|
||||
# define COMPILER_ID "TI"
|
||||
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
|
||||
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
|
||||
|
||||
#elif defined(__CLANG_FUJITSU)
|
||||
# define COMPILER_ID "FujitsuClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
|
||||
# define COMPILER_VERSION_INTERNAL_STR __clang_version__
|
||||
|
||||
|
||||
#elif defined(__FUJITSU)
|
||||
# define COMPILER_ID "Fujitsu"
|
||||
# if defined(__FCC_version__)
|
||||
# define COMPILER_VERSION __FCC_version__
|
||||
# elif defined(__FCC_major__)
|
||||
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
|
||||
# endif
|
||||
# if defined(__fcc_version)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
|
||||
# elif defined(__FCC_VERSION)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
|
||||
# endif
|
||||
|
||||
|
||||
#elif defined(__ghs__)
|
||||
# define COMPILER_ID "GHS"
|
||||
/* __GHS_VERSION_NUMBER = VVVVRP */
|
||||
# ifdef __GHS_VERSION_NUMBER
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__SCO_VERSION__)
|
||||
# define COMPILER_ID "SCO"
|
||||
|
||||
#elif defined(__ARMCC_VERSION) && !defined(__clang__)
|
||||
# define COMPILER_ID "ARMCC"
|
||||
#if __ARMCC_VERSION >= 1000000
|
||||
/* __ARMCC_VERSION = VRRPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
||||
#else
|
||||
/* __ARMCC_VERSION = VRPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
||||
#endif
|
||||
|
||||
|
||||
#elif defined(__clang__) && defined(__apple_build_version__)
|
||||
# define COMPILER_ID "AppleClang"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
|
||||
|
||||
#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
|
||||
# define COMPILER_ID "ARMClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
|
||||
|
||||
#elif defined(__clang__)
|
||||
# define COMPILER_ID "Clang"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
|
||||
#elif defined(__GNUC__) || defined(__GNUG__)
|
||||
# define COMPILER_ID "GNU"
|
||||
# if defined(__GNUC__)
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
|
||||
# else
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GNUG__)
|
||||
# endif
|
||||
# if defined(__GNUC_MINOR__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
# endif
|
||||
# if defined(__GNUC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
# define COMPILER_ID "MSVC"
|
||||
/* _MSC_VER = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# if defined(_MSC_FULL_VER)
|
||||
# if _MSC_VER >= 1400
|
||||
/* _MSC_FULL_VER = VVRRPPPPP */
|
||||
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
|
||||
# else
|
||||
/* _MSC_FULL_VER = VVRRPPPP */
|
||||
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
|
||||
# endif
|
||||
# endif
|
||||
# if defined(_MSC_BUILD)
|
||||
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
|
||||
# endif
|
||||
|
||||
#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
|
||||
# define COMPILER_ID "ADSP"
|
||||
#if defined(__VISUALDSPVERSION__)
|
||||
/* __VISUALDSPVERSION__ = 0xVVRRPP00 */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
|
||||
# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
|
||||
#endif
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
||||
# define COMPILER_ID "IAR"
|
||||
# if defined(__VER__) && defined(__ICCARM__)
|
||||
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
|
||||
# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
||||
# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
|
||||
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
|
||||
# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
||||
# endif
|
||||
|
||||
|
||||
/* These compilers are either not known or too old to define an
|
||||
identification macro. Try to identify the platform and guess that
|
||||
it is the native compiler. */
|
||||
#elif defined(__hpux) || defined(__hpua)
|
||||
# define COMPILER_ID "HP"
|
||||
|
||||
#else /* unknown compiler */
|
||||
# define COMPILER_ID ""
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
|
||||
#ifdef SIMULATE_ID
|
||||
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
||||
#endif
|
||||
|
||||
#ifdef __QNXNTO__
|
||||
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
||||
#endif
|
||||
|
||||
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
|
||||
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
#endif
|
||||
|
||||
#define STRINGIFY_HELPER(X) #X
|
||||
#define STRINGIFY(X) STRINGIFY_HELPER(X)
|
||||
|
||||
/* Identify known platforms by name. */
|
||||
#if defined(__linux) || defined(__linux__) || defined(linux)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
#elif defined(__MSYS__)
|
||||
# define PLATFORM_ID "MSYS"
|
||||
|
||||
#elif defined(__CYGWIN__)
|
||||
# define PLATFORM_ID "Cygwin"
|
||||
|
||||
#elif defined(__MINGW32__)
|
||||
# define PLATFORM_ID "MinGW"
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
# define PLATFORM_ID "Darwin"
|
||||
|
||||
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
||||
# define PLATFORM_ID "Windows"
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD)
|
||||
# define PLATFORM_ID "FreeBSD"
|
||||
|
||||
#elif defined(__NetBSD__) || defined(__NetBSD)
|
||||
# define PLATFORM_ID "NetBSD"
|
||||
|
||||
#elif defined(__OpenBSD__) || defined(__OPENBSD)
|
||||
# define PLATFORM_ID "OpenBSD"
|
||||
|
||||
#elif defined(__sun) || defined(sun)
|
||||
# define PLATFORM_ID "SunOS"
|
||||
|
||||
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
|
||||
# define PLATFORM_ID "AIX"
|
||||
|
||||
#elif defined(__hpux) || defined(__hpux__)
|
||||
# define PLATFORM_ID "HP-UX"
|
||||
|
||||
#elif defined(__HAIKU__)
|
||||
# define PLATFORM_ID "Haiku"
|
||||
|
||||
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
|
||||
# define PLATFORM_ID "BeOS"
|
||||
|
||||
#elif defined(__QNX__) || defined(__QNXNTO__)
|
||||
# define PLATFORM_ID "QNX"
|
||||
|
||||
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
|
||||
# define PLATFORM_ID "Tru64"
|
||||
|
||||
#elif defined(__riscos) || defined(__riscos__)
|
||||
# define PLATFORM_ID "RISCos"
|
||||
|
||||
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
|
||||
# define PLATFORM_ID "SINIX"
|
||||
|
||||
#elif defined(__UNIX_SV__)
|
||||
# define PLATFORM_ID "UNIX_SV"
|
||||
|
||||
#elif defined(__bsdos__)
|
||||
# define PLATFORM_ID "BSDOS"
|
||||
|
||||
#elif defined(_MPRAS) || defined(MPRAS)
|
||||
# define PLATFORM_ID "MP-RAS"
|
||||
|
||||
#elif defined(__osf) || defined(__osf__)
|
||||
# define PLATFORM_ID "OSF1"
|
||||
|
||||
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
|
||||
# define PLATFORM_ID "SCO_SV"
|
||||
|
||||
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
|
||||
# define PLATFORM_ID "ULTRIX"
|
||||
|
||||
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
|
||||
# define PLATFORM_ID "Xenix"
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(__LINUX__)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
# elif defined(__DOS__)
|
||||
# define PLATFORM_ID "DOS"
|
||||
|
||||
# elif defined(__OS2__)
|
||||
# define PLATFORM_ID "OS2"
|
||||
|
||||
# elif defined(__WINDOWS__)
|
||||
# define PLATFORM_ID "Windows3x"
|
||||
|
||||
# elif defined(__VXWORKS__)
|
||||
# define PLATFORM_ID "VxWorks"
|
||||
|
||||
# else /* unknown platform */
|
||||
# define PLATFORM_ID
|
||||
# endif
|
||||
|
||||
#elif defined(__INTEGRITY)
|
||||
# if defined(INT_178B)
|
||||
# define PLATFORM_ID "Integrity178"
|
||||
|
||||
# else /* regular Integrity */
|
||||
# define PLATFORM_ID "Integrity"
|
||||
# endif
|
||||
|
||||
#else /* unknown platform */
|
||||
# define PLATFORM_ID
|
||||
|
||||
#endif
|
||||
|
||||
/* For windows compilers MSVC and Intel we can determine
|
||||
the architecture of the compiler being used. This is because
|
||||
the compilers do not have flags that can change the architecture,
|
||||
but rather depend on which compiler is being used
|
||||
*/
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
# if defined(_M_IA64)
|
||||
# define ARCHITECTURE_ID "IA64"
|
||||
|
||||
# elif defined(_M_ARM64EC)
|
||||
# define ARCHITECTURE_ID "ARM64EC"
|
||||
|
||||
# elif defined(_M_X64) || defined(_M_AMD64)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# elif defined(_M_ARM64)
|
||||
# define ARCHITECTURE_ID "ARM64"
|
||||
|
||||
# elif defined(_M_ARM)
|
||||
# if _M_ARM == 4
|
||||
# define ARCHITECTURE_ID "ARMV4I"
|
||||
# elif _M_ARM == 5
|
||||
# define ARCHITECTURE_ID "ARMV5I"
|
||||
# else
|
||||
# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
|
||||
# endif
|
||||
|
||||
# elif defined(_M_MIPS)
|
||||
# define ARCHITECTURE_ID "MIPS"
|
||||
|
||||
# elif defined(_M_SH)
|
||||
# define ARCHITECTURE_ID "SHx"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(_M_I86)
|
||||
# define ARCHITECTURE_ID "I86"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
||||
# if defined(__ICCARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__ICCRX__)
|
||||
# define ARCHITECTURE_ID "RX"
|
||||
|
||||
# elif defined(__ICCRH850__)
|
||||
# define ARCHITECTURE_ID "RH850"
|
||||
|
||||
# elif defined(__ICCRL78__)
|
||||
# define ARCHITECTURE_ID "RL78"
|
||||
|
||||
# elif defined(__ICCRISCV__)
|
||||
# define ARCHITECTURE_ID "RISCV"
|
||||
|
||||
# elif defined(__ICCAVR__)
|
||||
# define ARCHITECTURE_ID "AVR"
|
||||
|
||||
# elif defined(__ICC430__)
|
||||
# define ARCHITECTURE_ID "MSP430"
|
||||
|
||||
# elif defined(__ICCV850__)
|
||||
# define ARCHITECTURE_ID "V850"
|
||||
|
||||
# elif defined(__ICC8051__)
|
||||
# define ARCHITECTURE_ID "8051"
|
||||
|
||||
# elif defined(__ICCSTM8__)
|
||||
# define ARCHITECTURE_ID "STM8"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__ghs__)
|
||||
# if defined(__PPC64__)
|
||||
# define ARCHITECTURE_ID "PPC64"
|
||||
|
||||
# elif defined(__ppc__)
|
||||
# define ARCHITECTURE_ID "PPC"
|
||||
|
||||
# elif defined(__ARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__x86_64__)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(__i386__)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__TI_COMPILER_VERSION__)
|
||||
# if defined(__TI_ARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__MSP430__)
|
||||
# define ARCHITECTURE_ID "MSP430"
|
||||
|
||||
# elif defined(__TMS320C28XX__)
|
||||
# define ARCHITECTURE_ID "TMS320C28x"
|
||||
|
||||
# elif defined(__TMS320C6X__) || defined(_TMS320C6X)
|
||||
# define ARCHITECTURE_ID "TMS320C6x"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#else
|
||||
# define ARCHITECTURE_ID
|
||||
#endif
|
||||
|
||||
/* Convert integer to decimal digit literals. */
|
||||
#define DEC(n) \
|
||||
('0' + (((n) / 10000000)%10)), \
|
||||
('0' + (((n) / 1000000)%10)), \
|
||||
('0' + (((n) / 100000)%10)), \
|
||||
('0' + (((n) / 10000)%10)), \
|
||||
('0' + (((n) / 1000)%10)), \
|
||||
('0' + (((n) / 100)%10)), \
|
||||
('0' + (((n) / 10)%10)), \
|
||||
('0' + ((n) % 10))
|
||||
|
||||
/* Convert integer to hex digit literals. */
|
||||
#define HEX(n) \
|
||||
('0' + ((n)>>28 & 0xF)), \
|
||||
('0' + ((n)>>24 & 0xF)), \
|
||||
('0' + ((n)>>20 & 0xF)), \
|
||||
('0' + ((n)>>16 & 0xF)), \
|
||||
('0' + ((n)>>12 & 0xF)), \
|
||||
('0' + ((n)>>8 & 0xF)), \
|
||||
('0' + ((n)>>4 & 0xF)), \
|
||||
('0' + ((n) & 0xF))
|
||||
|
||||
/* Construct a string literal encoding the version number. */
|
||||
#ifdef COMPILER_VERSION
|
||||
char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
|
||||
|
||||
/* Construct a string literal encoding the version number components. */
|
||||
#elif defined(COMPILER_VERSION_MAJOR)
|
||||
char const info_version[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
|
||||
COMPILER_VERSION_MAJOR,
|
||||
# ifdef COMPILER_VERSION_MINOR
|
||||
'.', COMPILER_VERSION_MINOR,
|
||||
# ifdef COMPILER_VERSION_PATCH
|
||||
'.', COMPILER_VERSION_PATCH,
|
||||
# ifdef COMPILER_VERSION_TWEAK
|
||||
'.', COMPILER_VERSION_TWEAK,
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct a string literal encoding the internal version number. */
|
||||
#ifdef COMPILER_VERSION_INTERNAL
|
||||
char const info_version_internal[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
|
||||
'i','n','t','e','r','n','a','l','[',
|
||||
COMPILER_VERSION_INTERNAL,']','\0'};
|
||||
#elif defined(COMPILER_VERSION_INTERNAL_STR)
|
||||
char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
|
||||
#endif
|
||||
|
||||
/* Construct a string literal encoding the version number components. */
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
char const info_simulate_version[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
|
||||
SIMULATE_VERSION_MAJOR,
|
||||
# ifdef SIMULATE_VERSION_MINOR
|
||||
'.', SIMULATE_VERSION_MINOR,
|
||||
# ifdef SIMULATE_VERSION_PATCH
|
||||
'.', SIMULATE_VERSION_PATCH,
|
||||
# ifdef SIMULATE_VERSION_TWEAK
|
||||
'.', SIMULATE_VERSION_TWEAK,
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
|
||||
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
|
||||
|
||||
|
||||
|
||||
#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L
|
||||
# if defined(__INTEL_CXX11_MODE__)
|
||||
# if defined(__cpp_aggregate_nsdmi)
|
||||
# define CXX_STD 201402L
|
||||
# else
|
||||
# define CXX_STD 201103L
|
||||
# endif
|
||||
# else
|
||||
# define CXX_STD 199711L
|
||||
# endif
|
||||
#elif defined(_MSC_VER) && defined(_MSVC_LANG)
|
||||
# define CXX_STD _MSVC_LANG
|
||||
#else
|
||||
# define CXX_STD __cplusplus
|
||||
#endif
|
||||
|
||||
const char* info_language_standard_default = "INFO" ":" "standard_default["
|
||||
#if CXX_STD > 202002L
|
||||
"23"
|
||||
#elif CXX_STD > 201703L
|
||||
"20"
|
||||
#elif CXX_STD >= 201703L
|
||||
"17"
|
||||
#elif CXX_STD >= 201402L
|
||||
"14"
|
||||
#elif CXX_STD >= 201103L
|
||||
"11"
|
||||
#else
|
||||
"98"
|
||||
#endif
|
||||
"]";
|
||||
|
||||
const char* info_language_extensions_default = "INFO" ":" "extensions_default["
|
||||
/* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */
|
||||
#if (defined(__clang__) || defined(__GNUC__) || \
|
||||
defined(__TI_COMPILER_VERSION__)) && \
|
||||
!defined(__STRICT_ANSI__) && !defined(_MSC_VER)
|
||||
"ON"
|
||||
#else
|
||||
"OFF"
|
||||
#endif
|
||||
"]";
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int require = 0;
|
||||
require += info_compiler[argc];
|
||||
require += info_platform[argc];
|
||||
#ifdef COMPILER_VERSION_MAJOR
|
||||
require += info_version[argc];
|
||||
#endif
|
||||
#ifdef COMPILER_VERSION_INTERNAL
|
||||
require += info_version_internal[argc];
|
||||
#endif
|
||||
#ifdef SIMULATE_ID
|
||||
require += info_simulate[argc];
|
||||
#endif
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
require += info_simulate_version[argc];
|
||||
#endif
|
||||
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
|
||||
require += info_cray[argc];
|
||||
#endif
|
||||
require += info_language_standard_default[argc];
|
||||
require += info_language_extensions_default[argc];
|
||||
(void)argv;
|
||||
return require;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
|
||||
@@ -152,6 +152,7 @@ typedef struct nrLDPC_segment_encoding_parameters_s{
|
||||
time_stats_t ts_interleave;
|
||||
time_stats_t ts_rate_match;
|
||||
time_stats_t ts_ldpc_encode;
|
||||
time_stats_t ts_output;
|
||||
} nrLDPC_segment_encoding_parameters_t;
|
||||
|
||||
/**
|
||||
@@ -229,6 +230,7 @@ typedef struct nrLDPC_slot_encoding_parameters_s{
|
||||
time_stats_t *tprep;
|
||||
time_stats_t *tparity;
|
||||
time_stats_t *toutput;
|
||||
time_stats_t *tconcat;
|
||||
nrLDPC_TB_encoding_parameters_t *TBs;
|
||||
} nrLDPC_slot_encoding_parameters_t;
|
||||
|
||||
|
||||
@@ -215,9 +215,8 @@ static void nr_process_decode_segment(void *arg)
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////// pl =====> llrProcBuf //////////////////////////////////
|
||||
int decodeIterations =
|
||||
LDPCdecoder(p_decoderParms, 0, 0, 0, l, llrProcBuf, p_procTime, rdata->abort_decode);
|
||||
|
||||
int decodeIterations =
|
||||
LDPCdecoder(p_decoderParms, 0, 0, 0, l, llrProcBuf, p_procTime, rdata->abort_decode);
|
||||
if (decodeIterations < p_decoderParms->numMaxIter) {
|
||||
memcpy(rdata->c, llrProcBuf, K >> 3);
|
||||
*rdata->decodeSuccess = true;
|
||||
@@ -282,6 +281,7 @@ int nrLDPC_prepare_TB_decoding(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_de
|
||||
|
||||
int32_t nrLDPC_coding_init(void)
|
||||
{
|
||||
cuda_support_init();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,321 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c
|
||||
* \brief Top-level routines for decoding LDPC transport channels
|
||||
*/
|
||||
|
||||
// [from gNB coding]
|
||||
#include "nr_rate_matching.h"
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "PHY/CODING/coding_extern.h"
|
||||
#include "PHY/CODING/coding_defs.h"
|
||||
#include "PHY/CODING/lte_interleaver_inline.h"
|
||||
#include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h"
|
||||
#include "PHY/CODING/nrLDPC_extern.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||
#include "SCHED_NR/sched_nr.h"
|
||||
#include "SCHED_NR/fapi_nr_l1.h"
|
||||
#include "defs.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#include <stdalign.h>
|
||||
#include <stdint.h>
|
||||
#include <syscall.h>
|
||||
#include <time.h>
|
||||
// #define gNB_DEBUG_TRACE
|
||||
|
||||
#define OAI_LDPC_DECODER_MAX_NUM_LLR 27000 // 26112 // NR_LDPC_NCOL_BG1*NR_LDPC_ZMAX = 68*384
|
||||
// #define DEBUG_CRC
|
||||
#ifdef DEBUG_CRC
|
||||
#define PRINT_CRC_CHECK(a) a
|
||||
#else
|
||||
#define PRINT_CRC_CHECK(a)
|
||||
#endif
|
||||
|
||||
#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h"
|
||||
#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h"
|
||||
|
||||
/**
|
||||
* \typedef nrLDPC_decoding_parameters_t
|
||||
* \struct nrLDPC_decoding_parameters_s
|
||||
* \brief decoding parameter of transport blocks
|
||||
* \var decoderParms decoder parameters
|
||||
* \var Qm modulation order
|
||||
* \var Kc ratio between the number of columns in the parity check matrix and the lifting size
|
||||
* it is fixed for a given base graph while the lifting size is chosen to have a sufficient number of columns
|
||||
* \var rv_index
|
||||
* \var max_number_iterations maximum number of LDPC iterations
|
||||
* \var abort_decode pointer to decode abort flag
|
||||
* \var tbslbrm transport block size LBRM in bytes
|
||||
* \var A Transport block size (This is A from 38.212 V15.4.0 section 5.1)
|
||||
* \var K Code block size at decoder output
|
||||
* \var Z lifting size
|
||||
* \var F filler bits size
|
||||
* \var r segment index in TB
|
||||
* \var E input llr segment size
|
||||
* \var C number of segments
|
||||
* \var llr input llr segment array
|
||||
* \var d Pointers to code blocks before LDPC decoding (38.212 V15.4.0 section 5.3.2)
|
||||
* \var d_to_be_cleared
|
||||
* pointer to the flag used to clear d properly
|
||||
* when true, clear d after rate dematching
|
||||
* \var c Pointers to code blocks after LDPC decoding (38.212 V15.4.0 section 5.2.2)
|
||||
* \var decodeSuccess pointer to the flag indicating that the decoding of the segment was successful
|
||||
* \var ans pointer to task answer used by the thread pool to detect task completion
|
||||
* \var p_ts_deinterleave pointer to deinterleaving time stats
|
||||
* \var p_ts_rate_unmatch pointer to rate unmatching time stats
|
||||
* \var p_ts_ldpc_decode pointer to decoding time stats
|
||||
*/
|
||||
typedef struct nrLDPC_decoding_parameters_s {
|
||||
t_nrLDPC_dec_params decoderParms;
|
||||
|
||||
uint8_t Qm;
|
||||
|
||||
uint8_t Kc;
|
||||
uint8_t rv_index;
|
||||
decode_abort_t *abort_decode;
|
||||
|
||||
uint32_t tbslbrm;
|
||||
uint32_t A;
|
||||
uint32_t K;
|
||||
uint32_t Z;
|
||||
uint32_t F;
|
||||
|
||||
uint32_t C;
|
||||
|
||||
int E;
|
||||
short *llr;
|
||||
int16_t *d;
|
||||
bool *d_to_be_cleared;
|
||||
uint8_t *c;
|
||||
bool *decodeSuccess;
|
||||
|
||||
task_ans_t *ans;
|
||||
|
||||
time_stats_t *p_ts_deinterleave;
|
||||
time_stats_t *p_ts_rate_unmatch;
|
||||
time_stats_t *p_ts_ldpc_decode;
|
||||
} nrLDPC_decoding_parameters_t;
|
||||
|
||||
static void nr_process_decode_segment(void *arg)
|
||||
{
|
||||
nrLDPC_decoding_parameters_t *rdata = (nrLDPC_decoding_parameters_t *)arg;
|
||||
t_nrLDPC_dec_params *p_decoderParms = &rdata->decoderParms;
|
||||
const int K = rdata->K;
|
||||
const int Kprime = K - rdata->F;
|
||||
const int A = rdata->A;
|
||||
const int E = rdata->E;
|
||||
const int Qm = rdata->Qm;
|
||||
const int rv_index = rdata->rv_index;
|
||||
const uint8_t Kc = rdata->Kc;
|
||||
short *ulsch_llr = rdata->llr;
|
||||
int8_t llrProcBuf[OAI_LDPC_DECODER_MAX_NUM_LLR] __attribute__((aligned(32)));
|
||||
|
||||
t_nrLDPC_time_stats procTime = {0};
|
||||
t_nrLDPC_time_stats *p_procTime = &procTime;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////// nr_deinterleaving_ldpc ///////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////// ulsch_llr =====> ulsch_harq->e //////////////////////////////
|
||||
|
||||
start_meas(rdata->p_ts_deinterleave);
|
||||
|
||||
/// code blocks after bit selection in rate matching for LDPC code (38.212 V15.4.0 section 5.4.2.1)
|
||||
int16_t harq_e[E];
|
||||
|
||||
nr_deinterleaving_ldpc(E, Qm, harq_e, ulsch_llr);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
stop_meas(rdata->p_ts_deinterleave);
|
||||
|
||||
start_meas(rdata->p_ts_rate_unmatch);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////// nr_rate_matching_ldpc_rx ////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////// ulsch_harq->e =====> ulsch_harq->d /////////////////////////
|
||||
|
||||
if (nr_rate_matching_ldpc_rx(rdata->tbslbrm,
|
||||
p_decoderParms->BG,
|
||||
p_decoderParms->Z,
|
||||
rdata->d,
|
||||
harq_e,
|
||||
rdata->C,
|
||||
rv_index,
|
||||
*rdata->d_to_be_cleared,
|
||||
E,
|
||||
rdata->F,
|
||||
K - rdata->F - 2 * (p_decoderParms->Z))
|
||||
== -1) {
|
||||
stop_meas(rdata->p_ts_rate_unmatch);
|
||||
LOG_E(PHY, "nrLDPC_coding_segment_decoder.c: Problem in rate_matching\n");
|
||||
|
||||
// Task completed
|
||||
completed_task_ans(rdata->ans);
|
||||
return;
|
||||
}
|
||||
stop_meas(rdata->p_ts_rate_unmatch);
|
||||
|
||||
*rdata->d_to_be_cleared = false;
|
||||
|
||||
p_decoderParms->crc_type = crcType(rdata->C, A);
|
||||
p_decoderParms->Kprime = lenWithCrc(rdata->C, A);
|
||||
|
||||
// set first 2*Z_c bits to zeros
|
||||
|
||||
int16_t z[68 * 384 + 16] __attribute__((aligned(16)));
|
||||
|
||||
start_meas(rdata->p_ts_ldpc_decode);
|
||||
|
||||
memset(z, 0, 2 * rdata->Z * sizeof(*z));
|
||||
// set Filler bits
|
||||
memset(z + Kprime, 127, rdata->F * sizeof(*z));
|
||||
// Move coded bits before filler bits
|
||||
memcpy(z + 2 * rdata->Z, rdata->d, (Kprime - 2 * rdata->Z) * sizeof(*z));
|
||||
// skip filler bits
|
||||
memcpy(z + K, rdata->d + (K - 2 * rdata->Z), (Kc * rdata->Z - K) * sizeof(*z));
|
||||
// Saturate coded bits before decoding into 8 bits values
|
||||
simde__m128i *pv = (simde__m128i *)&z;
|
||||
int8_t l[68 * 384 + 16] __attribute__((aligned(16)));
|
||||
simde__m128i *pl = (simde__m128i *)&l;
|
||||
for (int i = 0, j = 0; j < ((Kc * rdata->Z) >> 4) + 1; i += 2, j++) {
|
||||
pl[j] = simde_mm_packs_epi16(pv[i], pv[i + 1]);
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////// nrLDPC_decoder /////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////// pl =====> llrProcBuf //////////////////////////////////
|
||||
int decodeIterations =
|
||||
LDPCdecoder(p_decoderParms, 0, 0, 0, l, llrProcBuf, p_procTime, rdata->abort_decode);
|
||||
if (decodeIterations < p_decoderParms->numMaxIter) {
|
||||
memcpy(rdata->c, llrProcBuf, K >> 3);
|
||||
*rdata->decodeSuccess = true;
|
||||
} else {
|
||||
memset(rdata->c, 0, K >> 3);
|
||||
*rdata->decodeSuccess = false;
|
||||
}
|
||||
stop_meas(rdata->p_ts_ldpc_decode);
|
||||
|
||||
// Task completed
|
||||
completed_task_ans(rdata->ans);
|
||||
}
|
||||
|
||||
int nrLDPC_prepare_TB_decoding(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters,
|
||||
int pusch_id,
|
||||
thread_info_tm_t *t_info)
|
||||
{
|
||||
nrLDPC_TB_decoding_parameters_t *nrLDPC_TB_decoding_parameters = &nrLDPC_slot_decoding_parameters->TBs[pusch_id];
|
||||
|
||||
*nrLDPC_TB_decoding_parameters->processedSegments = 0;
|
||||
t_nrLDPC_dec_params decParams = {.check_crc = check_crc};
|
||||
decParams.BG = nrLDPC_TB_decoding_parameters->BG;
|
||||
decParams.Z = nrLDPC_TB_decoding_parameters->Z;
|
||||
decParams.numMaxIter = nrLDPC_TB_decoding_parameters->max_ldpc_iterations;
|
||||
decParams.outMode = 0;
|
||||
|
||||
for (int r = 0; r < nrLDPC_TB_decoding_parameters->C; r++) {
|
||||
nrLDPC_decoding_parameters_t *rdata = &((nrLDPC_decoding_parameters_t *)t_info->buf)[t_info->len];
|
||||
DevAssert(t_info->len < t_info->cap);
|
||||
rdata->ans = t_info->ans;
|
||||
t_info->len += 1;
|
||||
|
||||
decParams.R = nrLDPC_TB_decoding_parameters->segments[r].R;
|
||||
rdata->decoderParms = decParams;
|
||||
rdata->llr = nrLDPC_TB_decoding_parameters->segments[r].llr;
|
||||
rdata->Kc = decParams.BG == 2 ? 52 : 68;
|
||||
rdata->C = nrLDPC_TB_decoding_parameters->C;
|
||||
rdata->E = nrLDPC_TB_decoding_parameters->segments[r].E;
|
||||
rdata->A = nrLDPC_TB_decoding_parameters->A;
|
||||
rdata->Qm = nrLDPC_TB_decoding_parameters->Qm;
|
||||
rdata->K = nrLDPC_TB_decoding_parameters->K;
|
||||
rdata->Z = nrLDPC_TB_decoding_parameters->Z;
|
||||
rdata->F = nrLDPC_TB_decoding_parameters->F;
|
||||
rdata->rv_index = nrLDPC_TB_decoding_parameters->rv_index;
|
||||
rdata->tbslbrm = nrLDPC_TB_decoding_parameters->tbslbrm;
|
||||
rdata->abort_decode = nrLDPC_TB_decoding_parameters->abort_decode;
|
||||
rdata->d = nrLDPC_TB_decoding_parameters->segments[r].d;
|
||||
rdata->d_to_be_cleared = nrLDPC_TB_decoding_parameters->segments[r].d_to_be_cleared;
|
||||
rdata->c = nrLDPC_TB_decoding_parameters->segments[r].c;
|
||||
rdata->decodeSuccess = &nrLDPC_TB_decoding_parameters->segments[r].decodeSuccess;
|
||||
rdata->p_ts_deinterleave = &nrLDPC_TB_decoding_parameters->segments[r].ts_deinterleave;
|
||||
rdata->p_ts_rate_unmatch = &nrLDPC_TB_decoding_parameters->segments[r].ts_rate_unmatch;
|
||||
rdata->p_ts_ldpc_decode = &nrLDPC_TB_decoding_parameters->segments[r].ts_ldpc_decode;
|
||||
|
||||
task_t t = {.func = &nr_process_decode_segment, .args = rdata};
|
||||
pushTpool(nrLDPC_slot_decoding_parameters->threadPool, t);
|
||||
|
||||
LOG_D(PHY, "Added a block to decode, in pipe: %d\n", r);
|
||||
}
|
||||
return nrLDPC_TB_decoding_parameters->C;
|
||||
}
|
||||
|
||||
int32_t nrLDPC_coding_init(void)
|
||||
{
|
||||
cuda_support_init();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t nrLDPC_coding_shutdown(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t nrLDPC_coding_decoder(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters)
|
||||
{
|
||||
int nbSegments = 0;
|
||||
for (int pusch_id = 0; pusch_id < nrLDPC_slot_decoding_parameters->nb_TBs; pusch_id++) {
|
||||
nrLDPC_TB_decoding_parameters_t *nrLDPC_TB_decoding_parameters = &nrLDPC_slot_decoding_parameters->TBs[pusch_id];
|
||||
nbSegments += nrLDPC_TB_decoding_parameters->C;
|
||||
}
|
||||
nrLDPC_decoding_parameters_t arr[nbSegments];
|
||||
task_ans_t ans;
|
||||
init_task_ans(&ans, nbSegments);
|
||||
thread_info_tm_t t_info = {.buf = (uint8_t *)arr, .len = 0, .cap = nbSegments, .ans = &ans};
|
||||
|
||||
for (int pusch_id = 0; pusch_id < nrLDPC_slot_decoding_parameters->nb_TBs; pusch_id++) {
|
||||
(void)nrLDPC_prepare_TB_decoding(nrLDPC_slot_decoding_parameters, pusch_id, &t_info);
|
||||
}
|
||||
|
||||
// Execute thread pool tasks
|
||||
join_task_ans(t_info.ans);
|
||||
|
||||
for (int pusch_id = 0; pusch_id < nrLDPC_slot_decoding_parameters->nb_TBs; pusch_id++) {
|
||||
nrLDPC_TB_decoding_parameters_t *nrLDPC_TB_decoding_parameters = &nrLDPC_slot_decoding_parameters->TBs[pusch_id];
|
||||
for (int r = 0; r < nrLDPC_TB_decoding_parameters->C; r++) {
|
||||
if (nrLDPC_TB_decoding_parameters->segments[r].decodeSuccess) {
|
||||
*nrLDPC_TB_decoding_parameters->processedSegments = *nrLDPC_TB_decoding_parameters->processedSegments + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,322 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_decoder.c
|
||||
* \brief Top-level routines for decoding LDPC transport channels
|
||||
*/
|
||||
|
||||
// [from gNB coding]
|
||||
#include "nr_rate_matching.h"
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "PHY/CODING/coding_extern.h"
|
||||
#include "PHY/CODING/coding_defs.h"
|
||||
#include "PHY/CODING/lte_interleaver_inline.h"
|
||||
#include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h"
|
||||
#include "PHY/CODING/nrLDPC_extern.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||
#include "SCHED_NR/sched_nr.h"
|
||||
#include "SCHED_NR/fapi_nr_l1.h"
|
||||
#include "defs.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#include <stdalign.h>
|
||||
#include <stdint.h>
|
||||
#include <syscall.h>
|
||||
#include <time.h>
|
||||
// #define gNB_DEBUG_TRACE
|
||||
|
||||
#define OAI_LDPC_DECODER_MAX_NUM_LLR 27000 // 26112 // NR_LDPC_NCOL_BG1*NR_LDPC_ZMAX = 68*384
|
||||
// #define DEBUG_CRC
|
||||
#ifdef DEBUG_CRC
|
||||
#define PRINT_CRC_CHECK(a) a
|
||||
#else
|
||||
#define PRINT_CRC_CHECK(a)
|
||||
#endif
|
||||
|
||||
#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h"
|
||||
#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h"
|
||||
|
||||
/**
|
||||
* \typedef nrLDPC_decoding_parameters_t
|
||||
* \struct nrLDPC_decoding_parameters_s
|
||||
* \brief decoding parameter of transport blocks
|
||||
* \var decoderParms decoder parameters
|
||||
* \var Qm modulation order
|
||||
* \var Kc ratio between the number of columns in the parity check matrix and the lifting size
|
||||
* it is fixed for a given base graph while the lifting size is chosen to have a sufficient number of columns
|
||||
* \var rv_index
|
||||
* \var max_number_iterations maximum number of LDPC iterations
|
||||
* \var abort_decode pointer to decode abort flag
|
||||
* \var tbslbrm transport block size LBRM in bytes
|
||||
* \var A Transport block size (This is A from 38.212 V15.4.0 section 5.1)
|
||||
* \var K Code block size at decoder output
|
||||
* \var Z lifting size
|
||||
* \var F filler bits size
|
||||
* \var r segment index in TB
|
||||
* \var E input llr segment size
|
||||
* \var C number of segments
|
||||
* \var llr input llr segment array
|
||||
* \var d Pointers to code blocks before LDPC decoding (38.212 V15.4.0 section 5.3.2)
|
||||
* \var d_to_be_cleared
|
||||
* pointer to the flag used to clear d properly
|
||||
* when true, clear d after rate dematching
|
||||
* \var c Pointers to code blocks after LDPC decoding (38.212 V15.4.0 section 5.2.2)
|
||||
* \var decodeSuccess pointer to the flag indicating that the decoding of the segment was successful
|
||||
* \var ans pointer to task answer used by the thread pool to detect task completion
|
||||
* \var p_ts_deinterleave pointer to deinterleaving time stats
|
||||
* \var p_ts_rate_unmatch pointer to rate unmatching time stats
|
||||
* \var p_ts_ldpc_decode pointer to decoding time stats
|
||||
*/
|
||||
typedef struct nrLDPC_decoding_parameters_s {
|
||||
t_nrLDPC_dec_params decoderParms;
|
||||
|
||||
uint8_t Qm;
|
||||
|
||||
uint8_t Kc;
|
||||
uint8_t rv_index;
|
||||
decode_abort_t *abort_decode;
|
||||
|
||||
uint32_t tbslbrm;
|
||||
uint32_t A;
|
||||
uint32_t K;
|
||||
uint32_t Z;
|
||||
uint32_t F;
|
||||
|
||||
uint32_t C;
|
||||
|
||||
int E;
|
||||
short *llr;
|
||||
int16_t *d;
|
||||
bool *d_to_be_cleared;
|
||||
uint8_t *c;
|
||||
bool *decodeSuccess;
|
||||
|
||||
task_ans_t *ans;
|
||||
|
||||
time_stats_t *p_ts_deinterleave;
|
||||
time_stats_t *p_ts_rate_unmatch;
|
||||
time_stats_t *p_ts_ldpc_decode;
|
||||
} nrLDPC_decoding_parameters_t;
|
||||
|
||||
static void nr_process_decode_segment(void *arg)
|
||||
{
|
||||
nrLDPC_decoding_parameters_t *rdata = (nrLDPC_decoding_parameters_t *)arg;
|
||||
t_nrLDPC_dec_params *p_decoderParms = &rdata->decoderParms;
|
||||
const int K = rdata->K;
|
||||
const int Kprime = K - rdata->F;
|
||||
const int A = rdata->A;
|
||||
const int E = rdata->E;
|
||||
const int Qm = rdata->Qm;
|
||||
const int rv_index = rdata->rv_index;
|
||||
const uint8_t Kc = rdata->Kc;
|
||||
short *ulsch_llr = rdata->llr;
|
||||
int8_t llrProcBuf[OAI_LDPC_DECODER_MAX_NUM_LLR] __attribute__((aligned(32)));
|
||||
|
||||
t_nrLDPC_time_stats procTime = {0};
|
||||
t_nrLDPC_time_stats *p_procTime = &procTime;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////// nr_deinterleaving_ldpc ///////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////// ulsch_llr =====> ulsch_harq->e //////////////////////////////
|
||||
|
||||
start_meas(rdata->p_ts_deinterleave);
|
||||
|
||||
/// code blocks after bit selection in rate matching for LDPC code (38.212 V15.4.0 section 5.4.2.1)
|
||||
int16_t harq_e[E];
|
||||
|
||||
nr_deinterleaving_ldpc(E, Qm, harq_e, ulsch_llr);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
stop_meas(rdata->p_ts_deinterleave);
|
||||
|
||||
start_meas(rdata->p_ts_rate_unmatch);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////// nr_rate_matching_ldpc_rx ////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////// ulsch_harq->e =====> ulsch_harq->d /////////////////////////
|
||||
|
||||
if (nr_rate_matching_ldpc_rx(rdata->tbslbrm,
|
||||
p_decoderParms->BG,
|
||||
p_decoderParms->Z,
|
||||
rdata->d,
|
||||
harq_e,
|
||||
rdata->C,
|
||||
rv_index,
|
||||
*rdata->d_to_be_cleared,
|
||||
E,
|
||||
rdata->F,
|
||||
K - rdata->F - 2 * (p_decoderParms->Z))
|
||||
== -1) {
|
||||
stop_meas(rdata->p_ts_rate_unmatch);
|
||||
LOG_E(PHY, "nrLDPC_coding_segment_decoder.c: Problem in rate_matching\n");
|
||||
|
||||
// Task completed
|
||||
completed_task_ans(rdata->ans);
|
||||
return;
|
||||
}
|
||||
stop_meas(rdata->p_ts_rate_unmatch);
|
||||
|
||||
*rdata->d_to_be_cleared = false;
|
||||
|
||||
p_decoderParms->crc_type = crcType(rdata->C, A);
|
||||
p_decoderParms->Kprime = lenWithCrc(rdata->C, A);
|
||||
p_decoderParms->n_segments = rdata->C; //parameter for cuda stream
|
||||
|
||||
// set first 2*Z_c bits to zeros
|
||||
|
||||
int16_t z[68 * 384 + 16] __attribute__((aligned(16)));
|
||||
|
||||
start_meas(rdata->p_ts_ldpc_decode);
|
||||
|
||||
memset(z, 0, 2 * rdata->Z * sizeof(*z));
|
||||
// set Filler bits
|
||||
memset(z + Kprime, 127, rdata->F * sizeof(*z));
|
||||
// Move coded bits before filler bits
|
||||
memcpy(z + 2 * rdata->Z, rdata->d, (Kprime - 2 * rdata->Z) * sizeof(*z));
|
||||
// skip filler bits
|
||||
memcpy(z + K, rdata->d + (K - 2 * rdata->Z), (Kc * rdata->Z - K) * sizeof(*z));
|
||||
// Saturate coded bits before decoding into 8 bits values
|
||||
simde__m128i *pv = (simde__m128i *)&z;
|
||||
int8_t l[68 * 384 + 16] __attribute__((aligned(16)));
|
||||
simde__m128i *pl = (simde__m128i *)&l;
|
||||
for (int i = 0, j = 0; j < ((Kc * rdata->Z) >> 4) + 1; i += 2, j++) {
|
||||
pl[j] = simde_mm_packs_epi16(pv[i], pv[i + 1]);
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////// nrLDPC_decoder /////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////// pl =====> llrProcBuf //////////////////////////////////
|
||||
int decodeIterations =
|
||||
LDPCdecoder(p_decoderParms, 0, 0, 0, l, llrProcBuf, p_procTime, rdata->abort_decode);
|
||||
if (decodeIterations < p_decoderParms->numMaxIter) {
|
||||
memcpy(rdata->c, llrProcBuf, K >> 3);
|
||||
*rdata->decodeSuccess = true;
|
||||
} else {
|
||||
memset(rdata->c, 0, K >> 3);
|
||||
*rdata->decodeSuccess = false;
|
||||
}
|
||||
stop_meas(rdata->p_ts_ldpc_decode);
|
||||
|
||||
// Task completed
|
||||
completed_task_ans(rdata->ans);
|
||||
}
|
||||
|
||||
int nrLDPC_prepare_TB_decoding(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters,
|
||||
int pusch_id,
|
||||
thread_info_tm_t *t_info)
|
||||
{
|
||||
nrLDPC_TB_decoding_parameters_t *nrLDPC_TB_decoding_parameters = &nrLDPC_slot_decoding_parameters->TBs[pusch_id];
|
||||
|
||||
*nrLDPC_TB_decoding_parameters->processedSegments = 0;
|
||||
t_nrLDPC_dec_params decParams = {.check_crc = check_crc};
|
||||
decParams.BG = nrLDPC_TB_decoding_parameters->BG;
|
||||
decParams.Z = nrLDPC_TB_decoding_parameters->Z;
|
||||
decParams.numMaxIter = nrLDPC_TB_decoding_parameters->max_ldpc_iterations;
|
||||
decParams.outMode = 0;
|
||||
|
||||
for (int r = 0; r < nrLDPC_TB_decoding_parameters->C; r++) {
|
||||
nrLDPC_decoding_parameters_t *rdata = &((nrLDPC_decoding_parameters_t *)t_info->buf)[t_info->len];
|
||||
DevAssert(t_info->len < t_info->cap);
|
||||
rdata->ans = t_info->ans;
|
||||
t_info->len += 1;
|
||||
|
||||
decParams.R = nrLDPC_TB_decoding_parameters->segments[r].R;
|
||||
rdata->decoderParms = decParams;
|
||||
rdata->llr = nrLDPC_TB_decoding_parameters->segments[r].llr;
|
||||
rdata->Kc = decParams.BG == 2 ? 52 : 68;
|
||||
rdata->C = nrLDPC_TB_decoding_parameters->C;
|
||||
rdata->E = nrLDPC_TB_decoding_parameters->segments[r].E;
|
||||
rdata->A = nrLDPC_TB_decoding_parameters->A;
|
||||
rdata->Qm = nrLDPC_TB_decoding_parameters->Qm;
|
||||
rdata->K = nrLDPC_TB_decoding_parameters->K;
|
||||
rdata->Z = nrLDPC_TB_decoding_parameters->Z;
|
||||
rdata->F = nrLDPC_TB_decoding_parameters->F;
|
||||
rdata->rv_index = nrLDPC_TB_decoding_parameters->rv_index;
|
||||
rdata->tbslbrm = nrLDPC_TB_decoding_parameters->tbslbrm;
|
||||
rdata->abort_decode = nrLDPC_TB_decoding_parameters->abort_decode;
|
||||
rdata->d = nrLDPC_TB_decoding_parameters->segments[r].d;
|
||||
rdata->d_to_be_cleared = nrLDPC_TB_decoding_parameters->segments[r].d_to_be_cleared;
|
||||
rdata->c = nrLDPC_TB_decoding_parameters->segments[r].c;
|
||||
rdata->decodeSuccess = &nrLDPC_TB_decoding_parameters->segments[r].decodeSuccess;
|
||||
rdata->p_ts_deinterleave = &nrLDPC_TB_decoding_parameters->segments[r].ts_deinterleave;
|
||||
rdata->p_ts_rate_unmatch = &nrLDPC_TB_decoding_parameters->segments[r].ts_rate_unmatch;
|
||||
rdata->p_ts_ldpc_decode = &nrLDPC_TB_decoding_parameters->segments[r].ts_ldpc_decode;
|
||||
|
||||
task_t t = {.func = &nr_process_decode_segment, .args = rdata};
|
||||
pushTpool(nrLDPC_slot_decoding_parameters->threadPool, t);
|
||||
|
||||
LOG_D(PHY, "Added a block to decode, in pipe: %d\n", r);
|
||||
}
|
||||
return nrLDPC_TB_decoding_parameters->C;
|
||||
}
|
||||
|
||||
int32_t nrLDPC_coding_init(void)
|
||||
{
|
||||
cuda_support_init();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t nrLDPC_coding_shutdown(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t nrLDPC_coding_decoder(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters)
|
||||
{
|
||||
int nbSegments = 0;
|
||||
for (int pusch_id = 0; pusch_id < nrLDPC_slot_decoding_parameters->nb_TBs; pusch_id++) {
|
||||
nrLDPC_TB_decoding_parameters_t *nrLDPC_TB_decoding_parameters = &nrLDPC_slot_decoding_parameters->TBs[pusch_id];
|
||||
nbSegments += nrLDPC_TB_decoding_parameters->C;
|
||||
}
|
||||
nrLDPC_decoding_parameters_t arr[nbSegments];
|
||||
task_ans_t ans;
|
||||
init_task_ans(&ans, nbSegments);
|
||||
thread_info_tm_t t_info = {.buf = (uint8_t *)arr, .len = 0, .cap = nbSegments, .ans = &ans};
|
||||
|
||||
for (int pusch_id = 0; pusch_id < nrLDPC_slot_decoding_parameters->nb_TBs; pusch_id++) {
|
||||
(void)nrLDPC_prepare_TB_decoding(nrLDPC_slot_decoding_parameters, pusch_id, &t_info);
|
||||
}
|
||||
|
||||
// Execute thread pool tasks
|
||||
join_task_ans(t_info.ans);
|
||||
|
||||
for (int pusch_id = 0; pusch_id < nrLDPC_slot_decoding_parameters->nb_TBs; pusch_id++) {
|
||||
nrLDPC_TB_decoding_parameters_t *nrLDPC_TB_decoding_parameters = &nrLDPC_slot_decoding_parameters->TBs[pusch_id];
|
||||
for (int r = 0; r < nrLDPC_TB_decoding_parameters->C; r++) {
|
||||
if (nrLDPC_TB_decoding_parameters->segments[r].decodeSuccess) {
|
||||
*nrLDPC_TB_decoding_parameters->processedSegments = *nrLDPC_TB_decoding_parameters->processedSegments + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -59,6 +59,9 @@
|
||||
* \param output nrLDPC_coding_segment_encoder with concatenated segments and packed bits
|
||||
* \param Eoffset offset in number of bits of the first segment of the segment group within output
|
||||
*/
|
||||
|
||||
int nrLDPC_coding_encoder32(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters, nrLDPC_TB_encoding_parameters_t *nrLDPC_TB_encoding_parameters);
|
||||
|
||||
static void write_task_output(uint8_t *f,
|
||||
uint32_t E,
|
||||
uint8_t *f2,
|
||||
@@ -370,6 +373,7 @@ static int nrLDPC_launch_TB_encoding(nrLDPC_slot_encoding_parameters_t *nrLDPC_s
|
||||
.tprep = nrLDPC_slot_encoding_parameters->tprep,
|
||||
.tparity = nrLDPC_slot_encoding_parameters->tparity,
|
||||
.toutput = nrLDPC_slot_encoding_parameters->toutput,
|
||||
.tconcat = nrLDPC_slot_encoding_parameters->tconcat,
|
||||
.Kb = nrLDPC_TB_encoding_parameters->Kb,
|
||||
.Zc = nrLDPC_TB_encoding_parameters->Z,
|
||||
.BG = nrLDPC_TB_encoding_parameters->BG,
|
||||
@@ -406,16 +410,20 @@ int nrLDPC_coding_encoder(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encodin
|
||||
for (int dlsch_id = 0; dlsch_id < nrLDPC_slot_encoding_parameters->nb_TBs; dlsch_id++) {
|
||||
// Compute number of tasks to encode TB
|
||||
nrLDPC_TB_encoding_parameters_t *nrLDPC_TB_encoding_parameters = &nrLDPC_slot_encoding_parameters->TBs[dlsch_id];
|
||||
size_t n_seg = (nrLDPC_TB_encoding_parameters->C / 8 + ((nrLDPC_TB_encoding_parameters->C & 7) == 0 ? 0 : 1));
|
||||
nbTasks += n_seg;
|
||||
if (nrLDPC_TB_encoding_parameters->C > 8 && nrLDPC_TB_encoding_parameters->Z == 384) {
|
||||
nrLDPC_coding_encoder32(nrLDPC_slot_encoding_parameters,nrLDPC_TB_encoding_parameters);
|
||||
}
|
||||
else {
|
||||
size_t n_seg = (nrLDPC_TB_encoding_parameters->C / 8 + ((nrLDPC_TB_encoding_parameters->C & 7) == 0 ? 0 : 1));
|
||||
nbTasks += n_seg;
|
||||
|
||||
// Search for maximum E for sizing encoder output f and f2
|
||||
for (int seg_id = 0; seg_id < nrLDPC_TB_encoding_parameters->C; seg_id++) {
|
||||
uint32_t E = nrLDPC_TB_encoding_parameters->segments[seg_id].E;
|
||||
Emax = E > Emax ? E : Emax;
|
||||
// Search for maximum E for sizing encoder output f and f2
|
||||
for (int seg_id = 0; seg_id < nrLDPC_TB_encoding_parameters->C; seg_id++) {
|
||||
uint32_t E = nrLDPC_TB_encoding_parameters->segments[seg_id].E;
|
||||
Emax = E > Emax ? E : Emax;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create f and f2 to old encoding tasks outputs
|
||||
uint32_t Emax_ceil_mod = ceil_mod(Emax, 64);
|
||||
uint8_t f[nbTasks][Emax_ceil_mod] __attribute__((aligned(64)));
|
||||
@@ -432,6 +440,10 @@ int nrLDPC_coding_encoder(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encodin
|
||||
// For easier indexing we store the pointers to sub arrays of f and f2 in pointer arrays
|
||||
// Then a function to which we pass the pointer arrays can directly use f_2d[j] ans f2_2d[j]
|
||||
nrLDPC_TB_encoding_parameters_t *nrLDPC_TB_encoding_parameters = &nrLDPC_slot_encoding_parameters->TBs[dlsch_id];
|
||||
|
||||
if (nrLDPC_TB_encoding_parameters->C > 8 && nrLDPC_TB_encoding_parameters->Z == 384)
|
||||
continue;
|
||||
|
||||
size_t n_seg = (nrLDPC_TB_encoding_parameters->C / 8 + ((nrLDPC_TB_encoding_parameters->C & 7) == 0 ? 0 : 1));
|
||||
uint8_t *f_2d[n_seg];
|
||||
uint8_t *f2_2d[n_seg];
|
||||
@@ -449,16 +461,19 @@ int nrLDPC_coding_encoder(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encodin
|
||||
completed_many_task_ans(&ans, nbTasks - nbEncode);
|
||||
}
|
||||
// Execute thread pool tasks
|
||||
join_task_ans(&ans);
|
||||
if (nbTasks > 0) join_task_ans(&ans);
|
||||
|
||||
// Write output
|
||||
time_stats_t *tconcat = nrLDPC_slot_encoding_parameters->tconcat;
|
||||
if(tconcat != NULL) start_meas(tconcat);
|
||||
nbTasks = 0;
|
||||
for (int dlsch_id = 0; dlsch_id < nrLDPC_slot_encoding_parameters->nb_TBs; dlsch_id++) {
|
||||
nrLDPC_TB_encoding_parameters_t *nrLDPC_TB_encoding_parameters = &nrLDPC_slot_encoding_parameters->TBs[dlsch_id];
|
||||
uint32_t C = nrLDPC_TB_encoding_parameters->C;
|
||||
if (C > 8 && nrLDPC_TB_encoding_parameters->Z == 384)
|
||||
continue;
|
||||
size_t n_seg = (C / 8 + ((C & 7) == 0 ? 0 : 1));
|
||||
|
||||
time_stats_t *toutput = nrLDPC_slot_encoding_parameters->toutput;
|
||||
|
||||
for (int j = 0; j < n_seg; j++) {
|
||||
unsigned int macro_segment = j * 8;
|
||||
@@ -478,7 +493,6 @@ int nrLDPC_coding_encoder(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encodin
|
||||
}
|
||||
}
|
||||
|
||||
if(toutput != NULL) start_meas(toutput);
|
||||
|
||||
uint32_t Eoffset=0;
|
||||
for (int s=0; s<macro_segment; s++)
|
||||
@@ -494,10 +508,10 @@ int nrLDPC_coding_encoder(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encodin
|
||||
nrLDPC_TB_encoding_parameters->output,
|
||||
Eoffset);
|
||||
|
||||
if(toutput != NULL) stop_meas(toutput);
|
||||
}
|
||||
nbTasks += n_seg;
|
||||
}
|
||||
if(tconcat != NULL) stop_meas(tconcat);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,630 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nrLDPC_coding_segment_encoder.c
|
||||
* \brief Top-level routines for implementing LDPC encoding of transport channels
|
||||
*/
|
||||
|
||||
#include "nr_rate_matching.h"
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "PHY/CODING/coding_extern.h"
|
||||
#include "PHY/CODING/coding_defs.h"
|
||||
#include "PHY/CODING/lte_interleaver_inline.h"
|
||||
#include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h"
|
||||
#include "PHY/CODING/nrLDPC_extern.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||
#include "SCHED_NR/sched_nr.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include <openair2/UTIL/OPT/opt.h>
|
||||
|
||||
#include <syscall.h>
|
||||
|
||||
#define DEBUG_LDPC_ENCODING
|
||||
//#define DEBUG_LDPC_ENCODING_FREE 1
|
||||
/*
|
||||
static void write_task_output(uint8_t *f,
|
||||
uint32_t E,
|
||||
uint8_t *f2,
|
||||
uint32_t E2,
|
||||
bool Eshift,
|
||||
uint32_t E2_first_segment,
|
||||
uint32_t nb_segments,
|
||||
uint8_t *output,
|
||||
uint32_t Eoffset)
|
||||
{
|
||||
|
||||
#if defined(__AVX512VBMI__)
|
||||
uint64_t *output_p = (uint64_t*)output;
|
||||
__m512i inc = _mm512_set1_epi8(0x1);
|
||||
|
||||
for (int i=0;i<E2;i+=64) {
|
||||
uint32_t Eoffset2 = Eoffset;
|
||||
__m512i bitperm = _mm512_set1_epi64(0x3830282018100800);
|
||||
if (i<E) {
|
||||
for (int j=0; j < E2_first_segment; j++) {
|
||||
// Note: Here and below for AVX2, we are using the 64-bit SIMD instruction
|
||||
// instead of C >>/<< because when the Eoffset2_bit is 64 or 0, the <<
|
||||
// and >> operations are undefined and in fact don't give "0" which is
|
||||
// what we want here. The SIMD version do give 0 when the shift is 64
|
||||
uint32_t Eoffset2_byte = Eoffset2 >> 6;
|
||||
uint32_t Eoffset2_bit = Eoffset2 & 63;
|
||||
__m64 tmp = (__m64)_mm512_bitshuffle_epi64_mask(((__m512i *)f)[i >> 6],bitperm);
|
||||
*(__m64*)(output_p + Eoffset2_byte) = _mm_or_si64(*(__m64*)(output_p + Eoffset2_byte),_mm_slli_si64(tmp,Eoffset2_bit));
|
||||
*(__m64*)(output_p + Eoffset2_byte+1) = _mm_or_si64(*(__m64*)(output_p + Eoffset2_byte+1),_mm_srli_si64(tmp,(64-Eoffset2_bit)));
|
||||
Eoffset2 += E;
|
||||
bitperm = _mm512_add_epi8(bitperm ,inc);
|
||||
}
|
||||
} else {
|
||||
for (int j=0; j < E2_first_segment; j++) {
|
||||
Eoffset2 += E;
|
||||
bitperm = _mm512_add_epi8(bitperm ,inc);
|
||||
}
|
||||
}
|
||||
for (int j=E2_first_segment; j < nb_segments; j++) {
|
||||
uint32_t Eoffset2_byte = Eoffset2 >> 6;
|
||||
uint32_t Eoffset2_bit = Eoffset2 & 63;
|
||||
__m64 tmp = (__m64)_mm512_bitshuffle_epi64_mask(((__m512i *)f2)[i >> 6],bitperm);
|
||||
*(__m64*)(output_p + Eoffset2_byte) = _mm_or_si64(*(__m64*)(output_p + Eoffset2_byte),_mm_slli_si64(tmp,Eoffset2_bit));
|
||||
*(__m64*)(output_p + Eoffset2_byte+1) = _mm_or_si64(*(__m64*)(output_p + Eoffset2_byte+1),_mm_srli_si64(tmp,(64-Eoffset2_bit)));
|
||||
Eoffset2 += E2;
|
||||
bitperm = _mm512_add_epi8(bitperm ,inc);
|
||||
}
|
||||
output_p++;
|
||||
}
|
||||
|
||||
#elif defined(__aarch64__)
|
||||
uint16_t *output_p = (uint16_t*)output;
|
||||
const int8_t __attribute__ ((aligned (16))) ucShift[8][16] = {
|
||||
{0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7}, // segment 0
|
||||
{-1,0,1,2,3,4,5,6,-1,0,1,2,3,4,5,6}, // segment 1
|
||||
{-2,-1,0,1,2,3,4,5,-2,-1,0,1,2,3,4,5}, // segment 2
|
||||
{-3,-2,-1,0,1,2,3,4,-3,-2,-1,0,1,2,3,4}, // segment 3
|
||||
{-4,-3,-2,-1,0,1,2,3,-4,-3,-2,-1,0,1,2,3}, // segment 4
|
||||
{-5,-4,-3,-2,-1,0,1,2,-5,-4,-3,-2,-1,0,1,2}, // segment 5
|
||||
{-6,-5,-4,-3,-2,-1,0,1,-6,-5,-4,-3,-2,-1,0,1}, // segment 6
|
||||
{-7,-6,-5,-4,-3,-2,-1,0,-7,-6,-5,-4,-3,-2,-1,0}}; // segment 7
|
||||
const uint8_t __attribute__ ((aligned (16))) masks[16] =
|
||||
{0x1,0x2,0x4,0x8,0x10,0x20,0x40,0x80,0x1,0x2,0x4,0x8,0x10,0x20,0x40,0x80};
|
||||
int8x16_t vshift[8];
|
||||
for (int n=0;n<8;n++) vshift[n] = vld1q_s8(ucShift[n]);
|
||||
uint8x16_t vmask = vld1q_u8(masks);
|
||||
|
||||
for (int i=0;i<E2;i+=16) {
|
||||
uint32_t Eoffset2 = Eoffset;
|
||||
if (i<E) {
|
||||
for (int j=0; j < E2_first_segment; j++) {
|
||||
uint32_t Eoffset2_byte = Eoffset2 >> 4;
|
||||
uint32_t Eoffset2_bit = Eoffset2 & 15;
|
||||
uint8x16_t cshift = vandq_u8(vshlq_u8(((uint8x16_t*)f)[i >> 4],vshift[j]),vmask);
|
||||
int32_t tmp = (int)vaddv_u8(vget_low_u8(cshift));
|
||||
tmp += (int)(vaddv_u8(vget_high_u8(cshift))<<8);
|
||||
*(output_p + Eoffset2_byte) |= (uint16_t)(tmp<<Eoffset2_bit);
|
||||
*(output_p + Eoffset2_byte+1) |= (uint16_t)(tmp>>(16-Eoffset2_bit));
|
||||
Eoffset2 += E;
|
||||
}
|
||||
} else {
|
||||
for (int j=0; j < E2_first_segment; j++) {
|
||||
Eoffset2 += E;
|
||||
}
|
||||
}
|
||||
for (int j=E2_first_segment; j < nb_segments; j++) {
|
||||
uint32_t Eoffset2_byte = Eoffset2 >> 4;
|
||||
uint32_t Eoffset2_bit = Eoffset2 & 15;
|
||||
uint8x16_t cshift = vandq_u8(vshlq_u8(((uint8x16_t*)f2)[i >> 4],vshift[j]),vmask);
|
||||
int32_t tmp = (int)vaddv_u8(vget_low_u8(cshift));
|
||||
tmp += (int)(vaddv_u8(vget_high_u8(cshift))<<8);
|
||||
*(output_p + Eoffset2_byte) |= (uint16_t)(tmp<<Eoffset2_bit);
|
||||
*(output_p + Eoffset2_byte+1) |= (uint16_t)(tmp>>(16-Eoffset2_bit));
|
||||
Eoffset2 += E2;
|
||||
}
|
||||
output_p++;
|
||||
}
|
||||
|
||||
#else
|
||||
uint32_t *output_p = (uint32_t*)output;
|
||||
|
||||
for (int i=0; i < E2; i += 32) {
|
||||
uint32_t Eoffset2 = Eoffset;
|
||||
if (i < E) {
|
||||
for (int j = 0; j < E2_first_segment; j++) {
|
||||
// Note: Here and below, we are using the 64-bit SIMD instruction
|
||||
// instead of C >>/<< because when the Eoffset2_bit is 64 or 0, the <<
|
||||
// and >> operations are undefined and in fact don't give "0" which is
|
||||
// what we want here. The SIMD version do give 0 when the shift is 64
|
||||
uint32_t Eoffset2_byte = Eoffset2 >> 5;
|
||||
uint32_t Eoffset2_bit = Eoffset2 & 31;
|
||||
int tmp = _mm256_movemask_epi8(_mm256_slli_epi16(((__m256i *)f)[i >> 5], 7 - j));
|
||||
__m64 tmp64 = _mm_set1_pi32(tmp);
|
||||
__m64 out64 = _mm_set_pi32(*(output_p + Eoffset2_byte + 1), *(output_p + Eoffset2_byte));
|
||||
__m64 tmp64b = _mm_or_si64(out64, _mm_slli_pi32(tmp64, Eoffset2_bit));
|
||||
__m64 tmp64c = _mm_or_si64(out64, _mm_srli_pi32(tmp64, (32 - Eoffset2_bit)));
|
||||
*(output_p + Eoffset2_byte) = _m_to_int(tmp64b);
|
||||
*(output_p + Eoffset2_byte + 1) = _m_to_int(_mm_srli_si64(tmp64c, 32));
|
||||
Eoffset2 += E;
|
||||
}
|
||||
} else {
|
||||
for (int j = 0; j < E2_first_segment; j++) {
|
||||
Eoffset2 += E;
|
||||
}
|
||||
}
|
||||
for (int j = E2_first_segment; j < nb_segments; j++) {
|
||||
uint32_t Eoffset2_byte = Eoffset2 >> 5;
|
||||
uint32_t Eoffset2_bit = Eoffset2 & 31;
|
||||
int tmp = _mm256_movemask_epi8(_mm256_slli_epi16(((__m256i *)f2)[i >> 5], 7 - j));
|
||||
__m64 tmp64 = _mm_set1_pi32(tmp);
|
||||
__m64 out64 = _mm_set_pi32(*(output_p + Eoffset2_byte + 1), *(output_p + Eoffset2_byte));
|
||||
__m64 tmp64b = _mm_or_si64(out64, _mm_slli_pi32(tmp64, Eoffset2_bit));
|
||||
__m64 tmp64c = _mm_or_si64(out64, _mm_srli_pi32(tmp64, (32 - Eoffset2_bit)));
|
||||
*(output_p + Eoffset2_byte) = _m_to_int(tmp64b);
|
||||
*(output_p + Eoffset2_byte + 1) = _m_to_int(_mm_srli_si64(tmp64c, 32));
|
||||
Eoffset2 += E2;
|
||||
}
|
||||
output_p++;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
static void unpack_output(uint32_t *f,
|
||||
uint32_t E,
|
||||
uint32_t *f2,
|
||||
uint32_t E2,
|
||||
uint32_t E2_first_segment32,
|
||||
uint32_t E2_first_segment,
|
||||
uint32_t nb_segments,
|
||||
uint8_t *output) {
|
||||
|
||||
|
||||
int s;
|
||||
// int s0;
|
||||
uint32_t *fp;
|
||||
int foffset;
|
||||
uint32_t *output_p = (uint32_t *)output;
|
||||
// printf("E %d, E2 %d, E2_first_segment %d, E2_first_segment32 %d, nb_segments %d\n",E,E2,E2_first_segment,E2_first_segment32,nb_segments);
|
||||
uint32_t bit_index = 0;
|
||||
#if 0
|
||||
const int32_t ucShift0[32][4] = { {0,1,2,3}, {-1,0,1,2},{-2,-1,0,1}, {-3,-2,-1,0}, {-4,-3,-2,-1}, {-5,-4,-3,-2}, {-6,-5,-4,-3}, {-7,-6,-5,-4}, {-8,-7,-6,-5}, {-9,-8,-7,-6}, {-10,-9,-8,-7}, {-11,-10,-9,-8}, {-12,-11,-10,-9}, {-13,-12,-11,-10}, {-14,-13,-12,-11}, {-15,-14,-13,-12}, {-16,-15,-14,-13}, {-17,-16,-15,-14}, {-18,-17,-16,-15}, {-19,-18,-17,-16}, {-20,-19,-18,-17}, {-21,-20,-19,-18}, {-22,-21,-20,-19}, {-23,-22,-21,-20}, {-24,-23,-22,-21}, {-25,-24,-23,-22}, {-26,-25,-24,-23}, {-27,-26,-25,-24}, {-28,-27,-26,-25}, {-29,-28,-27,-26}, {-30,-29,-28,-27}, {-31,-30,-29,-28}};
|
||||
|
||||
const int32_t ucShift1[32][4] = { {4,5,6,7}, {3,4,5,6}, {2,3,4,5}, {1,2,3,4}, {0,1,2,3}, {-1,0,1,2},{-2,-1,0,1}, {-3,-2,-1,0}, {-4,-3,-2,-1}, {-5,-4,-3,-2}, {-6,-5,-4,-3}, {-7,-6,-5,-4}, {-8,-7,-6,-5}, {-9,-8,-7,-6}, {-10,-9,-8,-7}, {-11,-10,-9,-8}, {-12,-11,-10,-9}, {-13,-12,-11,-10}, {-14,-13,-12,-11}, {-15,-14,-13,-12}, {-16,-15,-14,-13}, {-17,-16,-15,-14}, {-18,-17,-16,-15}, {-19,-18,-17,-16}, {-20,-19,-18,-17}, {-21,-20,-19,-18}, {-22,-21,-20,-19}, {-23,-22,-21,-20}, {-24,-23,-22,-21}, {-25,-24,-23,-22}, {-26,-25,-24,-23}, {-27,-26,-25,-24}};
|
||||
|
||||
const int32_t ucShift2[32][4] = { {8,9,10,11},{7,8,9,10}, {6,7,8,9}, {5,6,7,8}, {4,5,6,7}, {3,4,5,6}, {2,3,4,5}, {1,2,3,4}, {0,1,2,3}, {-1,0,1,2},{-2,-1,0,1}, {-3,-2,-1,0}, {-4,-3,-2,-1}, {-5,-4,-3,-2}, {-6,-5,-4,-3}, {-7,-6,-5,-4}, {-8,-7,-6,-5}, {-9,-8,-7,-6}, {-10,-9,-8,-7}, {-11,-10,-9,-8}, {-12,-11,-10,-9}, {-13,-12,-11,-10}, {-14,-13,-12,-11}, {-15,-14,-13,-12}, {-16,-15,-14,-13}, {-17,-16,-15,-14}, {-18,-17,-16,-15}, {-19,-18,-17,-16}, {-20,-19,-18,-17}, {-21,-20,-19,-18}, {-22,-21,-20,-19},{-23,-22,-21,-20}};
|
||||
|
||||
const int32_t ucShift3[32][4] = { {12,13,14,15}, {11,12,13,14}, {10,11,12,13}, {9,10,11,12}, {8,9,10,11},{7,8,9,10}, {6,7,8,9}, {5,6,7,8}, {4,5,6,7}, {3,4,5,6}, {2,3,4,5}, {1,2,3,4}, {0,1,2,3}, {-1,0,1,2},{-2,-1,0,1}, {-3,-2,-1,0}, {-4,-3,-2,-1}, {-5,-4,-3,-2}, {-6,-5,-4,-3}, {-7,-6,-5,-4}, {-8,-7,-6,-5}, {-9,-8,-7,-6}, {-10,-9,-8,-7}, {-11,-10,-9,-8}, {-12,-11,-10,-9}, {-13,-12,-11,-10}, {-14,-13,-12,-11}, {-15,-14,-13,-12}, {-16,-15,-14,-13}, {-17,-16,-15,-14}, {-18,-17,-16,-15}, {-19,-18,-17,-16}};
|
||||
|
||||
const int32_t ucShift4[32][4] = { {16,17,18,19}, {15,16,17,18}, {14,15,16,17}, {13,14,15,16}, {12,13,14,15}, {11,12,13,14}, {10,11,12,13}, {9,10,11,12}, {8,9,10,11},{7,8,9,10}, {6,7,8,9}, {5,6,7,8}, {4,5,6,7}, {3,4,5,6}, {2,3,4,5}, {1,2,3,4}, {0,1,2,3}, {-1,0,1,2},{-2,-1,0,1}, {-3,-2,-1,0}, {-4,-3,-2,-1}, {-5,-4,-3,-2}, {-6,-5,-4,-3}, {-7,-6,-5,-4}, {-8,-7,-6,-5}, {-9,-8,-7,-6}, {-10,-9,-8,-7}, {-11,-10,-9,-8}, {-12,-11,-10,-9}, {-13,-12,-11,-10}, {-14,-13,-12,-11}, {-15,-14,-13,-12}};
|
||||
|
||||
const int32_t ucShift5[32][4] = { {20,21,22,23}, {19,20,21,22}, {18,19,20,21}, {17,18,19,20}, {16,17,18,19}, {15,16,17,18}, {14,15,16,17}, {13,14,15,16}, {12,13,14,15}, {11,12,13,14}, {10,11,12,13}, {9,10,11,12}, {8,9,10,11},{7,8,9,10}, {6,7,8,9}, {5,6,7,8}, {4,5,6,7}, {3,4,5,6}, {2,3,4,5}, {1,2,3,4}, {0,1,2,3}, {-1,0,1,2},{-2,-1,0,1}, {-3,-2,-1,0}, {-4,-3,-2,-1}, {-5,-4,-3,-2}, {-6,-5,-4,-3}, {-7,-6,-5,-4}, {-8,-7,-6,-5}, {-9,-8,-7,-6}, {-10,-9,-8,-7}, {-11,-10,-9,-8}};
|
||||
|
||||
const int32_t ucShift6[32][4] = { {24,25,26,27}, {23,24,25,26}, {22,23,24,25}, {21,22,23,24}, {20,21,22,23}, {19,20,21,22}, {18,19,20,21}, {17,18,19,20}, {16,17,18,19}, {15,16,17,18}, {14,15,16,17}, {13,14,15,16}, {12,13,14,15}, {11,12,13,14}, {10,11,12,13}, {9,10,11,12}, {8,9,10,11},{7,8,9,10}, {6,7,8,9}, {5,6,7,8}, {4,5,6,7}, {3,4,5,6}, {2,3,4,5}, {1,2,3,4}, {0,1,2,3}, {-1,0,1,2},{-2,-1,0,1}, {-3,-2,-1,0}, {-4,-3,-2,-1}, {-5,-4,-3,-2}, {-6,-5,-4,-3}, {-7,-6,-5,-4}};
|
||||
|
||||
const int32_t ucShift7[32][4] = { {28,29,30,31}, {27,28,29,30}, {26,27,28,29}, {25,26,27,28}, {24,25,26,27}, {23,24,25,26}, {22,23,24,25}, {21,22,23,24}, {20,21,22,23}, {19,20,21,22}, {18,19,20,21}, {17,18,19,20}, {16,17,18,19}, {15,16,17,18}, {14,15,16,17}, {13,14,15,16}, {12,13,14,15}, {11,12,13,14}, {10,11,12,13}, {9,10,11,12}, {8,9,10,11},{7,8,9,10}, {6,7,8,9}, {5,6,7,8}, {4,5,6,7}, {3,4,5,6}, {2,3,4,5}, {1,2,3,4}, {0,1,2,3}, {-1,0,1,2},{-2,-1,0,1}, {-3,-2,-1,0}};
|
||||
const uint32_t __attribute__ ((aligned (16))) masks0[4] = {0x1,0x2,0x4,0x8};
|
||||
const uint32_t __attribute__ ((aligned (16))) masks1[4] = {0x10,0x20,0x40,0x80};
|
||||
const uint32_t __attribute__ ((aligned (16))) masks2[4] = {0x100,0x200,0x400,0x800};
|
||||
const uint32_t __attribute__ ((aligned (16))) masks3[4] = {0x1000,0x2000,0x4000,0x8000};
|
||||
const uint32_t __attribute__ ((aligned (16))) masks4[4] = {0x10000,0x20000,0x40000,0x80000};
|
||||
const uint32_t __attribute__ ((aligned (16))) masks5[4] = {0x100000,0x200000,0x400000,0x800000};
|
||||
const uint32_t __attribute__ ((aligned (16))) masks6[4] = {0x1000000,0x2000000,0x4000000,0x8000000};
|
||||
const uint32_t __attribute__ ((aligned (16))) masks7[4] = {0x10000000,0x20000000,0x40000000,0x80000000};
|
||||
int32x4_t vshift0[32],vshift1[32],vshift2[32],vshift3[32],vshift4[32],vshift5[32],vshift6[32],vshift7[32];
|
||||
for (int n=0;n<32;n++) {
|
||||
vshift0[n] = vld1q_s32(ucShift0[n]);
|
||||
vshift1[n] = vld1q_s32(ucShift1[n]);
|
||||
vshift2[n] = vld1q_s32(ucShift2[n]);
|
||||
vshift3[n] = vld1q_s32(ucShift3[n]);
|
||||
vshift4[n] = vld1q_s32(ucShift4[n]);
|
||||
vshift5[n] = vld1q_s32(ucShift5[n]);
|
||||
vshift6[n] = vld1q_s32(ucShift6[n]);
|
||||
vshift7[n] = vld1q_s32(ucShift7[n]);
|
||||
}
|
||||
uint32x4_t vmask0 = vld1q_u32(masks0);
|
||||
uint32x4_t vmask1 = vld1q_u32(masks1);
|
||||
uint32x4_t vmask2 = vld1q_u32(masks2);
|
||||
uint32x4_t vmask3 = vld1q_u32(masks3);
|
||||
uint32x4_t vmask4 = vld1q_u32(masks4);
|
||||
uint32x4_t vmask5 = vld1q_u32(masks5);
|
||||
uint32x4_t vmask6 = vld1q_u32(masks6);
|
||||
uint32x4_t vmask7 = vld1q_u32(masks7);
|
||||
uint32_t output_tmp=0;
|
||||
int s2=0;
|
||||
for (s = 0; s < E2_first_segment ; s++) {
|
||||
s2 = s&31;
|
||||
foffset = (s>>5)*E;
|
||||
fp = f+foffset;
|
||||
int i;
|
||||
if ((bit_index&31) == 0 ) {
|
||||
for (i = 0; i < (E>>5)<<5; i+=32) {
|
||||
uint32x4_t *fp128 = (uint32x4_t*)&fp[i];
|
||||
uint32x4_t cshift = vandq_u32(vshlq_u32(fp128[0],vshift0[s2]),vmask0);
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[1],vshift1[s2]),vmask1));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[2],vshift2[s2]),vmask2));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[3],vshift3[s2]),vmask3));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[4],vshift4[s2]),vmask4));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[5],vshift5[s2]),vmask5));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[6],vshift6[s2]),vmask6));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[7],vshift7[s2]),vmask7));
|
||||
|
||||
*(output_p + (bit_index>>5)) = vaddvq_u32(cshift);
|
||||
bit_index+=32;
|
||||
}
|
||||
uint32_t Emod32=E&31;
|
||||
if (Emod32 != 0) {
|
||||
uint32x4_t *fp128 = (uint32x4_t*)&fp[i];
|
||||
uint32x4_t cshift = vandq_u32(vshlq_u32(fp128[0],vshift0[s2]),vmask0);
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[1],vshift1[s2]),vmask1));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[2],vshift2[s2]),vmask2));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[3],vshift3[s2]),vmask3));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[4],vshift4[s2]),vmask4));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[5],vshift5[s2]),vmask5));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[6],vshift6[s2]),vmask6));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[7],vshift7[s2]),vmask7));
|
||||
|
||||
*(output_p + (bit_index>>5)) = vaddvq_u32(cshift)&((1<<Emod32)-1);
|
||||
bit_index+=Emod32;
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (i = 0; i < (E>>5)<<5; i+=32) {
|
||||
uint32x4_t *fp128 = (uint32x4_t*)&fp[i];
|
||||
uint32x4_t cshift = vandq_u32(vshlq_u32(fp128[0],vshift0[s2]),vmask0);
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[1],vshift1[s2]),vmask1));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[2],vshift2[s2]),vmask2));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[3],vshift3[s2]),vmask3));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[4],vshift4[s2]),vmask4));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[5],vshift5[s2]),vmask5));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[6],vshift6[s2]),vmask6));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[7],vshift7[s2]),vmask7));
|
||||
uint32_t tmp = vaddvq_u32(cshift);
|
||||
*(output_p + (bit_index>>5)) |= (tmp<<(bit_index&31));
|
||||
*(output_p + (bit_index>>5)+1) |= (tmp>>(32-(bit_index&31)));
|
||||
bit_index+=32;
|
||||
}
|
||||
uint32_t Emod32=E&31;
|
||||
if (Emod32 != 0) {
|
||||
uint32x4_t *fp128 = (uint32x4_t*)&fp[i];
|
||||
uint32x4_t cshift = vandq_u32(vshlq_u32(fp128[0],vshift0[s2]),vmask0);
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[1],vshift1[s2]),vmask1));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[2],vshift2[s2]),vmask2));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[3],vshift3[s2]),vmask3));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[4],vshift4[s2]),vmask4));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[5],vshift5[s2]),vmask5));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[6],vshift6[s2]),vmask6));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[7],vshift7[s2]),vmask7));
|
||||
uint32_t tmp = vaddvq_u32(cshift);
|
||||
tmp&=((1<<Emod32)-1);
|
||||
*(output_p + (bit_index>>5)) |= (tmp<<(bit_index&31));
|
||||
*(output_p + (bit_index>>5)+1) |= (tmp>>(32-(bit_index&31)));
|
||||
bit_index+=Emod32;
|
||||
}
|
||||
}
|
||||
}
|
||||
// s0 = s;
|
||||
for ( ; s < nb_segments ; s++){
|
||||
s2 = s&31;
|
||||
foffset = ((s>>5)-E2_first_segment32)*E2;
|
||||
fp = f2+foffset;
|
||||
int i;
|
||||
if ((bit_index&31) == 0 ) {
|
||||
for (i = 0; i < (E2>>5)<<5; i+=32) {
|
||||
uint32x4_t *fp128 = (uint32x4_t*)&fp[i];
|
||||
uint32x4_t cshift = vandq_u32(vshlq_u32(fp128[0],vshift0[s2]),vmask0);
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[1],vshift1[s2]),vmask1));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[2],vshift2[s2]),vmask2));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[3],vshift3[s2]),vmask3));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[4],vshift4[s2]),vmask4));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[5],vshift5[s2]),vmask5));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[6],vshift6[s2]),vmask6));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[7],vshift7[s2]),vmask7));
|
||||
*(output_p + (bit_index>>5)) = vaddvq_u32(cshift);
|
||||
bit_index+=32;
|
||||
}
|
||||
uint32_t E2mod32=E2&31;
|
||||
if (E2mod32 != 0) {
|
||||
uint32x4_t *fp128 = (uint32x4_t*)&fp[i];
|
||||
uint32x4_t cshift = vandq_u32(vshlq_u32(fp128[0],vshift0[s2]),vmask0);
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[1],vshift1[s2]),vmask1));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[2],vshift2[s2]),vmask2));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[3],vshift3[s2]),vmask3));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[4],vshift4[s2]),vmask4));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[5],vshift5[s2]),vmask5));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[6],vshift6[s2]),vmask6));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[7],vshift7[s2]),vmask7));
|
||||
*(output_p + (bit_index>>5)) = vaddvq_u32(cshift)&((1<<E2mod32)-1);
|
||||
bit_index+=E2mod32;
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (i = 0; i < (E2>>5)<<5; i+=32) {
|
||||
uint32x4_t *fp128 = (uint32x4_t*)&fp[i];
|
||||
uint32x4_t cshift = vandq_u32(vshlq_u32(fp128[0],vshift0[s2]),vmask0);
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[1],vshift1[s2]),vmask1));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[2],vshift2[s2]),vmask2));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[3],vshift3[s2]),vmask3));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[4],vshift4[s2]),vmask4));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[5],vshift5[s2]),vmask5));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[6],vshift6[s2]),vmask6));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[7],vshift7[s2]),vmask7));
|
||||
uint32_t tmp = vaddvq_u32(cshift);
|
||||
*(output_p + (bit_index>>5)) |= (tmp<<(bit_index&31));
|
||||
*(output_p + (bit_index>>5)+1) |= (tmp>>(32-(bit_index&31)));
|
||||
bit_index+=32;
|
||||
}
|
||||
uint32_t E2mod32=E2&31;
|
||||
if (E2mod32 != 0) {
|
||||
uint32x4_t *fp128 = (uint32x4_t*)&fp[i];
|
||||
uint32x4_t cshift = vandq_u32(vshlq_u32(fp128[0],vshift0[s2]),vmask0);
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[1],vshift1[s2]),vmask1));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[2],vshift2[s2]),vmask2));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[3],vshift3[s2]),vmask3));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[4],vshift4[s2]),vmask4));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[5],vshift5[s2]),vmask5));
|
||||
cshift = vorrq_u32(cshift,vandq_u32(vshlq_u32(fp128[6],vshift6[s2]),vmask6));
|
||||
uint32_t tmp = vaddvq_u32(cshift);
|
||||
tmp&=((1<<E2mod32)-1);
|
||||
*(output_p + (bit_index>>5)) |= (tmp<<(bit_index&31));
|
||||
*(output_p + (bit_index>>5)+1) |= (tmp>>(32-(bit_index&31)));
|
||||
bit_index+=E2mod32;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else // non SIMD version
|
||||
int s0;
|
||||
int segpos;
|
||||
for (s = 0; s < E2_first_segment ; s++) {
|
||||
foffset = (s>>5)*E;
|
||||
fp = f+foffset;
|
||||
segpos = (1<<s);
|
||||
for (int i = 0; i < E; i++) {
|
||||
output_p[bit_index>>5]|=((fp[i] & segpos)!=0)<<(bit_index&31);
|
||||
bit_index++;
|
||||
}
|
||||
}
|
||||
s0 = s;
|
||||
for ( ; s < nb_segments ; s++){
|
||||
foffset = ((s-s0)>>5)*E2;
|
||||
fp = f2+foffset;
|
||||
segpos = (1<<s);
|
||||
for (int i = 0; i < E2; i++) {
|
||||
output_p[bit_index>>5]|=((fp[i] & segpos)!=0)<<(bit_index&31);
|
||||
bit_index++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/**
|
||||
* \typedef ldpc8blocks_args_t
|
||||
* \struct ldpc8blocks_args_s
|
||||
* \brief Arguments of an encoding task
|
||||
* encode up to 8 code blocks
|
||||
* \var nrLDPC_TB_encoding_parameters TB encoding parameters as defined in the coding library interface
|
||||
* \var impp encoder implementation specific parameters for the task
|
||||
* \var f first interleaver output to be filled by the task
|
||||
* \var f2 second interleaver output to be filled by the task
|
||||
* in case of a shift of E in the code blocks group processed by the task
|
||||
*/
|
||||
|
||||
static void ldpcnblocks(nrLDPC_TB_encoding_parameters_t *nrLDPC_TB_encoding_parameters, encoder_implemparams_t impp)
|
||||
{
|
||||
|
||||
uint8_t mod_order = nrLDPC_TB_encoding_parameters->Qm;
|
||||
uint16_t nb_rb = nrLDPC_TB_encoding_parameters->nb_rb;
|
||||
uint32_t A = nrLDPC_TB_encoding_parameters->A;
|
||||
|
||||
unsigned int G = nrLDPC_TB_encoding_parameters->G;
|
||||
LOG_D(PHY, "dlsch coding A %d K %d G %d (nb_rb %d, mod_order %d)\n", A, impp.K, G, nb_rb, (int)mod_order);
|
||||
|
||||
// nrLDPC_encoder output is in "d"
|
||||
// let's make this interface happy!
|
||||
uint32_t d[4][68*384];
|
||||
uint8_t *c[nrLDPC_TB_encoding_parameters->C];
|
||||
|
||||
|
||||
for (int r = 0; r < nrLDPC_TB_encoding_parameters->C; r++)
|
||||
c[r] = nrLDPC_TB_encoding_parameters->segments[r].c;
|
||||
start_meas(&nrLDPC_TB_encoding_parameters->segments[impp.first_seg].ts_ldpc_encode);
|
||||
LDPCencoder32(c, d, &impp);
|
||||
stop_meas(&nrLDPC_TB_encoding_parameters->segments[impp.first_seg].ts_ldpc_encode);
|
||||
// Compute where to place in output buffer that is concatenation of all segments
|
||||
|
||||
#ifdef DEBUG_LDPC_ENCODING
|
||||
LOG_D(PHY, "rvidx in encoding = %d\n", nrLDPC_TB_encoding_parameters->rv_index);
|
||||
#endif
|
||||
const uint32_t E = nrLDPC_TB_encoding_parameters->segments[0].E;
|
||||
uint32_t E2=E;
|
||||
uint32_t Emax = E;
|
||||
int n_seg = nrLDPC_TB_encoding_parameters->C>>5;
|
||||
int n_seg2 = n_seg;
|
||||
if ((nrLDPC_TB_encoding_parameters->C & 31) > 0) n_seg2++;
|
||||
int r_shift = n_seg2;
|
||||
int r_shift2 = nrLDPC_TB_encoding_parameters->C;
|
||||
for (int s=0;s<nrLDPC_TB_encoding_parameters->C;s++) {
|
||||
//printf("segment %d E %d\n",s,nrLDPC_TB_encoding_parameters->segments[s].E);
|
||||
if (nrLDPC_TB_encoding_parameters->segments[s].E != E) {
|
||||
E2=nrLDPC_TB_encoding_parameters->segments[s].E;
|
||||
if(E2 > Emax)
|
||||
Emax = E2;
|
||||
r_shift = s>>5;
|
||||
r_shift2 = s;
|
||||
// printf("r_shift %d, r_shift2 %d\n",r_shift,r_shift2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
LOG_D(NR_PHY,
|
||||
"Rate Matching, Code segment %d...%d r_shift %d n_seg2 %d (coded bits (G) %u, E %d, E2 %d Filler bits %d, Filler offset %d mod_order %d, nb_rb "
|
||||
"%d,nrOfLayer %d)...\n",
|
||||
0,
|
||||
impp.n_segments-1,
|
||||
r_shift,
|
||||
n_seg2,
|
||||
G,
|
||||
E,E2,
|
||||
impp.F,
|
||||
impp.K - impp.F - 2 * impp.Zc,
|
||||
mod_order,
|
||||
nb_rb,
|
||||
nrLDPC_TB_encoding_parameters->nb_layers);
|
||||
/*
|
||||
printf("Rate Matching, Code segment 0..%d r_shift %d r_shift2 %d n_seg2 %d (coded bits (G) %u, E %d, E2 %d Filler bits %d, Filler offset %d mod_order %d, nb_rb "
|
||||
"%d,nrOfLayer %d)...\n",
|
||||
impp.n_segments-1,
|
||||
r_shift,
|
||||
r_shift2,
|
||||
n_seg2,
|
||||
G,
|
||||
E,E2,
|
||||
impp.F,
|
||||
impp.K - impp.F - 2 * impp.Zc,
|
||||
mod_order,
|
||||
nb_rb,
|
||||
nrLDPC_TB_encoding_parameters->nb_layers);
|
||||
*/
|
||||
|
||||
uint32_t Tbslbrm = nrLDPC_TB_encoding_parameters->tbslbrm;
|
||||
|
||||
uint32_t e[E*(r_shift+1)];
|
||||
uint32_t e2[E2*(n_seg2-r_shift)];
|
||||
uint32_t f[E*(r_shift+1)];
|
||||
uint32_t f2[E2*(n_seg2-r_shift)];
|
||||
|
||||
// Interleaver outputs are stored in the output arrays
|
||||
uint8_t *output = nrLDPC_TB_encoding_parameters->output;
|
||||
|
||||
start_meas(&nrLDPC_TB_encoding_parameters->segments[0].ts_rate_match);
|
||||
memset(e,0,sizeof(e));
|
||||
memset(f,0,sizeof(f));
|
||||
if (1/*r_shift < n_seg2*/) {
|
||||
memset(e2,0,sizeof(e2));
|
||||
memset(f2,0,sizeof(f2));
|
||||
}
|
||||
|
||||
for (int r=0;r<n_seg2;r++) {
|
||||
if (r<=r_shift)
|
||||
nr_rate_matching_ldpc32(Tbslbrm,
|
||||
impp.BG,
|
||||
impp.Zc,
|
||||
d[r],
|
||||
e+(r*E),
|
||||
impp.n_segments,
|
||||
impp.F,
|
||||
impp.K - impp.F - 2 * impp.Zc,
|
||||
nrLDPC_TB_encoding_parameters->rv_index,
|
||||
E);
|
||||
if (r>=r_shift)
|
||||
nr_rate_matching_ldpc32(Tbslbrm,
|
||||
impp.BG,
|
||||
impp.Zc,
|
||||
d[r],
|
||||
e2+((r-r_shift)*E2),
|
||||
impp.n_segments,
|
||||
impp.F,
|
||||
impp.K - impp.F - 2 * impp.Zc,
|
||||
nrLDPC_TB_encoding_parameters->rv_index,
|
||||
E2);
|
||||
/*
|
||||
if (r==(n_seg2-1)) {
|
||||
for (int i=0;i<16;i++) printf("rm: %x %x\n",d[n_seg2-1][i],e2[((n_seg2-1)*E2)+i]);
|
||||
}
|
||||
*/
|
||||
}
|
||||
stop_meas(&nrLDPC_TB_encoding_parameters->segments[0].ts_rate_match);
|
||||
if (impp.K - impp.F - 2 * impp.Zc > E) {
|
||||
LOG_E(PHY,
|
||||
"dlsch coding A %d Kr %d G %d (nb_rb %d, mod_order %d)\n",
|
||||
A,
|
||||
impp.K,
|
||||
G,
|
||||
nb_rb,
|
||||
(int)mod_order);
|
||||
|
||||
LOG_E(NR_PHY,
|
||||
"Rate Matching, Code segments 0..%d (coded bits (G) %u, E %d, Kr %d, Filler bits %d, Filler offset %d mod_order %d, "
|
||||
"nb_rb %d)...\n",
|
||||
impp.n_segments,
|
||||
G,
|
||||
E,
|
||||
impp.K,
|
||||
impp.F,
|
||||
impp.K - impp.F - 2 * impp.Zc,
|
||||
mod_order,
|
||||
nb_rb);
|
||||
}
|
||||
|
||||
//printf("interleaving r_shift %d, n_seg2 %d\n",r_shift,n_seg2);
|
||||
start_meas(&nrLDPC_TB_encoding_parameters->segments[0].ts_interleave);
|
||||
|
||||
for (int r=0;r<=r_shift;r++)
|
||||
nr_interleaving_ldpc32(E,
|
||||
mod_order,
|
||||
e+E*r,
|
||||
f+E*r);
|
||||
|
||||
for (int r=r_shift;r<n_seg2;r++)
|
||||
nr_interleaving_ldpc32(E2,
|
||||
mod_order,
|
||||
e2+E2*(r-r_shift),
|
||||
f2+E2*(r-r_shift));
|
||||
/*
|
||||
for (int i=0;i<16;i++) printf("intl (f offset %d): %x %x\n",(n_seg2-1)*E2,e2[((n_seg2-1)*E2)+i],f2[((n_seg2-1)*E2)+i]);
|
||||
printf("-------------------\n");
|
||||
for (int i=E2-16;i<E2;i++) printf("intl (f offset %d): %x %x\n",(n_seg2-1)*E2,e2[((n_seg2-1)*E2)+i],f2[((n_seg2-1)*E2)+i]);
|
||||
*/
|
||||
stop_meas(&nrLDPC_TB_encoding_parameters->segments[0].ts_interleave);
|
||||
|
||||
if (impp.tconcat) start_meas(impp.tconcat);
|
||||
unpack_output(f,E,f2,E2,r_shift,r_shift2,nrLDPC_TB_encoding_parameters->C,output);
|
||||
if (impp.tconcat) stop_meas(impp.tconcat);
|
||||
|
||||
}
|
||||
|
||||
int nrLDPC_coding_encoder32(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters, nrLDPC_TB_encoding_parameters_t *nrLDPC_TB_encoding_parameters)
|
||||
{
|
||||
|
||||
|
||||
encoder_implemparams_t common_segment_params = {
|
||||
.n_segments = nrLDPC_TB_encoding_parameters->C,
|
||||
.tinput = nrLDPC_slot_encoding_parameters->tinput,
|
||||
.tprep = nrLDPC_slot_encoding_parameters->tprep,
|
||||
.tparity = nrLDPC_slot_encoding_parameters->tparity,
|
||||
.toutput = nrLDPC_slot_encoding_parameters->toutput,
|
||||
.tconcat = nrLDPC_slot_encoding_parameters->tconcat,
|
||||
.Kb = nrLDPC_TB_encoding_parameters->Kb,
|
||||
.Zc = nrLDPC_TB_encoding_parameters->Z,
|
||||
.BG = nrLDPC_TB_encoding_parameters->BG,
|
||||
.output = nrLDPC_TB_encoding_parameters->output,
|
||||
.K = nrLDPC_TB_encoding_parameters->K,
|
||||
.F = nrLDPC_TB_encoding_parameters->F,
|
||||
};
|
||||
|
||||
LOG_D(NR_PHY,"Calling ldpcnblocks (C %d, Z %d, K %d)\n",common_segment_params.n_segments,common_segment_params.Zc,common_segment_params.K);
|
||||
ldpcnblocks(nrLDPC_TB_encoding_parameters, common_segment_params);
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -24,7 +24,8 @@
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
// #define RM_DEBUG 1
|
||||
|
||||
#define USE128BIT
|
||||
|
||||
static const uint8_t index_k0[2][4] = {{0, 17, 33, 56}, {0, 13, 25, 43}};
|
||||
|
||||
void nr_interleaving_ldpc(uint32_t E, uint8_t Qm, uint8_t *e, uint8_t *f)
|
||||
@@ -359,14 +360,15 @@ void nr_interleaving_ldpc(uint32_t E, uint8_t Qm, uint8_t *e, uint8_t *f)
|
||||
f = (uint8_t *)f_512;
|
||||
#endif
|
||||
#ifdef USE128BIT
|
||||
e0_128 = (simde__m128i *)e0;
|
||||
e1_128 = (simde__m128i *)e1;
|
||||
e2_128 = (simde__m128i *)e2;
|
||||
e3_128 = (simde__m128i *)e3;
|
||||
e4_128 = (simde__m128i *)e4;
|
||||
e5_128 = (simde__m128i *)e5;
|
||||
e6_128 = (simde__m128i *)e6;
|
||||
e7_128 = (simde__m128i *)e7;
|
||||
simde__m128i *e0_128 = (simde__m128i *)e0;
|
||||
simde__m128i *e1_128 = (simde__m128i *)e1;
|
||||
simde__m128i *e2_128 = (simde__m128i *)e2;
|
||||
simde__m128i *e3_128 = (simde__m128i *)e3;
|
||||
simde__m128i *e4_128 = (simde__m128i *)e4;
|
||||
simde__m128i *e5_128 = (simde__m128i *)e5;
|
||||
simde__m128i *e6_128 = (simde__m128i *)e6;
|
||||
simde__m128i *e7_128 = (simde__m128i *)e7;
|
||||
simde__m128i *f_128 = (simde__m128i *)f;
|
||||
for (; i < (EQm & ~15); i += 16) {
|
||||
simde__m128i e0j = simde_mm_loadu_si128(e0_128++);
|
||||
simde__m128i e1j = simde_mm_loadu_si128(e1_128++);
|
||||
@@ -444,6 +446,452 @@ void nr_interleaving_ldpc(uint32_t E, uint8_t Qm, uint8_t *e, uint8_t *f)
|
||||
}
|
||||
}
|
||||
|
||||
void nr_interleaving_ldpc32(uint32_t E, uint8_t Qm, uint32_t *e, uint32_t *f)
|
||||
{
|
||||
const uint32_t EQm = E / Qm;
|
||||
memset(f, 0, E * sizeof(uint32_t));
|
||||
switch(Qm) {
|
||||
case 2: {
|
||||
uint32_t *e0 = e;
|
||||
uint32_t *e1 = e0 + EQm;
|
||||
int i = 0;
|
||||
/*
|
||||
#ifdef __AVX512VBMI__
|
||||
// clang-format off
|
||||
const __m512i p8a = _mm512_set_epi8(95, 31, 94, 30, 93, 29, 92, 28, 91, 27, 90, 26, 89, 25, 88, 24,
|
||||
87, 23, 86, 22, 85, 21, 84, 20, 83, 19, 82, 18, 81, 17, 80, 16,
|
||||
79, 15, 78, 14, 77, 13, 76, 12, 75, 11, 74, 10, 73, 9, 72, 8,
|
||||
71, 7, 70, 6, 69, 5, 68, 4, 67, 3, 66, 2, 65, 1, 64, 0);
|
||||
const __m512i p8b = _mm512_set_epi8(127, 63, 126, 62, 125, 61, 124, 60, 123, 59, 122, 58, 121, 57, 120,
|
||||
56, 119, 55, 118, 54, 117, 53, 116, 52, 115, 51, 114, 50, 113, 49, 112,
|
||||
48, 111, 47, 110, 46, 109, 45, 108, 44, 107, 43, 106, 42, 105, 41, 104,
|
||||
40, 103, 39, 102, 38, 101, 37, 100, 36, 99, 35, 98, 34, 97, 33, 96, 32);
|
||||
// clang-format on
|
||||
__m512i *f_512 = (__m512i *)f;
|
||||
__m512i *e0_512 = (__m512i *)e0;
|
||||
__m512i *e1_512 = (__m512i *)e1;
|
||||
for (; i < (EQm & ~63); i += 64) {
|
||||
__m512i e0j = _mm512_loadu_si512(e0_512++);
|
||||
__m512i e1j = _mm512_loadu_si512(e1_512++);
|
||||
// e0(i) e1(i) e0(i+1) e1(i+1) .... e0(i+15) e1(i+15)
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi8(e0j, p8a, e1j));
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi8(e0j, p8b, e1j));
|
||||
}
|
||||
e0 = (uint8_t *)e0_512;
|
||||
e1 = (uint8_t *)e1_512;
|
||||
f = (uint8_t *)f_512;
|
||||
#endif
|
||||
#ifdef USE128BIT
|
||||
simde__m128i *f_128 = (simde__m128i *)f;
|
||||
simde__m128i *e0_128 = (simde__m128i *)e0;
|
||||
simde__m128i *e1_128 = (simde__m128i *)e1;
|
||||
for (; i < (EQm & ~15); i += 64) {
|
||||
simde__m128i e0j = simde_mm_loadu_si128(e0_128++);
|
||||
simde__m128i e1j = simde_mm_loadu_si128(e1_128++);
|
||||
simde_mm_storeu_si128(f_128++, simde_mm_unpacklo_epi8(e0j, e1j));
|
||||
simde_mm_storeu_si128(f_128++, simde_mm_unpackhi_epi8(e0j, e1j));
|
||||
}
|
||||
e0 = (uint8_t *)e0_128;
|
||||
e1 = (uint8_t *)e1_128;
|
||||
f = (uint8_t *)f_128;
|
||||
#endif
|
||||
*/
|
||||
for (; i < EQm; i++) {
|
||||
*f++ = *e0++;
|
||||
*f++ = *e1++;
|
||||
}
|
||||
} break;
|
||||
case 4: {
|
||||
uint32_t *e0 = e;
|
||||
uint32_t *e1 = e0 + EQm;
|
||||
uint32_t *e2 = e1 + EQm;
|
||||
uint32_t *e3 = e2 + EQm;
|
||||
int i = 0;
|
||||
/*
|
||||
#ifdef __AVX512VBMI__
|
||||
// clang-format off
|
||||
const __m512i p8a = _mm512_set_epi8(95, 31, 94, 30, 93, 29, 92, 28, 91, 27, 90, 26, 89, 25, 88, 24, 87, 23, 86,
|
||||
22, 85, 21, 84, 20, 83, 19, 82, 18, 81, 17, 80, 16, 79, 15, 78, 14, 77, 13,
|
||||
76, 12, 75, 11, 74, 10, 73, 9, 72, 8, 71, 7, 70, 6, 69, 5, 68, 4, 67, 3, 66, 2, 65, 1, 64, 0);
|
||||
const __m512i p8b = _mm512_set_epi8(127, 63, 126, 62, 125, 61, 124, 60, 123, 59, 122, 58, 121, 57, 120, 56, 119,
|
||||
55, 118, 54, 117, 53, 116, 52, 115, 51, 114, 50, 113, 49, 112, 48, 111, 47,
|
||||
110, 46, 109, 45, 108, 44, 107, 43, 106, 42, 105, 41, 104, 40, 103, 39, 102,
|
||||
38, 101, 37, 100, 36, 99, 35, 98, 34, 97, 33, 96, 32);
|
||||
const __m512i p16a = _mm512_set_epi16(47, 15, 46, 14, 45, 13, 44, 12, 43, 11, 42, 10, 41, 9, 40, 8, 39, 7, 38, 6,
|
||||
37, 5, 36, 4, 35, 3, 34, 2, 33, 1, 32, 0);
|
||||
const __m512i p16b = _mm512_set_epi16(63, 31, 62, 30, 61, 29, 60, 28, 59, 27, 58, 26, 57, 25, 56, 24, 55, 23, 54,
|
||||
22, 53, 21, 52, 20, 51, 19, 50, 18, 49, 17, 48, 16);
|
||||
// clang-format on
|
||||
__m512i *e0_512 = (__m512i *)e0;
|
||||
__m512i *e1_512 = (__m512i *)e1;
|
||||
__m512i *e2_512 = (__m512i *)e2;
|
||||
__m512i *e3_512 = (__m512i *)e3;
|
||||
__m512i *f_512 = (__m512i *)f;
|
||||
for (; i < (EQm & ~63); i += 64) {
|
||||
__m512i e0j = _mm512_loadu_si512(e0_512++);
|
||||
__m512i e1j = _mm512_loadu_si512(e1_512++);
|
||||
__m512i e2j = _mm512_loadu_si512(e2_512++);
|
||||
__m512i e3j = _mm512_loadu_si512(e3_512++);
|
||||
__m512i tmp0 = _mm512_permutex2var_epi8(e0j, p8a, e1j); // e0(i) e1(i) e0(i+1) e1(i+1) .... e0(i+15) e1(i+15)
|
||||
__m512i tmp1 = _mm512_permutex2var_epi8(e2j, p8a, e3j); // e2(i) e3(i) e2(i+1) e3(i+1) .... e2(i+15) e3(i+15)
|
||||
// e0(i) e1(i) e2(i) e3(i) ... e0(i+7) e1(i+7) e2(i+7) e3(i+7)
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp0, p16a, tmp1));
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp0, p16b, tmp1));
|
||||
tmp0 = _mm512_permutex2var_epi8(e0j, p8b, e1j); // e0(i) e1(i) e0(i+1) e1(i+1) .... e0(i+15) e1(i+15)
|
||||
tmp1 = _mm512_permutex2var_epi8(e2j, p8b, e3j); // e2(i) e3(i) e2(i+1) e3(i+1) .... e2(i+15) e3(i+15)
|
||||
// e0(i) e1(i) e2(i) e3(i) ... e0(i+7) e1(i+7) e2(i+7) e3(i+7)
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp0, p16a, tmp1));
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp0, p16b, tmp1));
|
||||
}
|
||||
|
||||
e0 = (uint8_t *)e0_512;
|
||||
e1 = (uint8_t *)e1_512;
|
||||
e2 = (uint8_t *)e2_512;
|
||||
e3 = (uint8_t *)e3_512;
|
||||
f = (uint8_t *)f_512;
|
||||
#endif
|
||||
#ifdef USE128BIT
|
||||
simde__m128i *e0_128 = (simde__m128i *)e0;
|
||||
simde__m128i *e1_128 = (simde__m128i *)e1;
|
||||
simde__m128i *e2_128 = (simde__m128i *)e2;
|
||||
simde__m128i *e3_128 = (simde__m128i *)e3;
|
||||
simde__m128i *f_128 = (simde__m128i *)f;
|
||||
for (; i < (EQm & ~15); i += 16) {
|
||||
simde__m128i e0j = simde_mm_loadu_si128(e0_128++);
|
||||
simde__m128i e1j = simde_mm_loadu_si128(e1_128++);
|
||||
simde__m128i e2j = simde_mm_loadu_si128(e2_128++);
|
||||
simde__m128i e3j = simde_mm_loadu_si128(e3_128++);
|
||||
simde__m128i tmp0 = simde_mm_unpacklo_epi8(e0j, e1j); // e0(i) e1(i) e0(i+1) e1(i+1) .... e0(i+7) e1(i+7)
|
||||
simde__m128i tmp1 = simde_mm_unpacklo_epi8(e2j, e3j); // e2(i) e3(i) e2(i+1) e3(i+1) .... e2(i+7) e3(i+7)
|
||||
simde_mm_storeu_si128(f_128++,
|
||||
simde_mm_unpacklo_epi16(tmp0, tmp1)); // e0(i) e1(i) e2(i) e3(i) ... e0(i+3) e1(i+3) e2(i+3) e3(i+3)
|
||||
simde_mm_storeu_si128(
|
||||
f_128++,
|
||||
simde_mm_unpackhi_epi16(tmp0, tmp1)); // e0(i+4) e1(i+4) e2(i+4) e3(i+4) ... e0(i+7) e1(i+7) e2(i+7) e3(i+7)
|
||||
tmp0 = simde_mm_unpackhi_epi8(e0j, e1j); // e0(i+8) e1(i+8) e0(i+9) e1(i+9) .... e0(i+15) e1(i+15)
|
||||
tmp1 = simde_mm_unpackhi_epi8(e2j, e3j); // e2(i+8) e3(i+9) e2(i+10) e3(i+10) .... e2(i+31) e3(i+31)
|
||||
simde_mm_storeu_si128(f_128++, simde_mm_unpacklo_epi16(tmp0, tmp1));
|
||||
simde_mm_storeu_si128(f_128++, simde_mm_unpackhi_epi16(tmp0, tmp1));
|
||||
}
|
||||
e0 = (uint8_t *)e0_128;
|
||||
e1 = (uint8_t *)e1_128;
|
||||
e2 = (uint8_t *)e2_128;
|
||||
e3 = (uint8_t *)e3_128;
|
||||
f = (uint8_t *)f_128;
|
||||
#endif
|
||||
*/
|
||||
for (; i < EQm; i++) {
|
||||
*f++ = *e0++;
|
||||
*f++ = *e1++;
|
||||
*f++ = *e2++;
|
||||
*f++ = *e3++;
|
||||
}
|
||||
} break;
|
||||
case 6: {
|
||||
uint32_t *e0 = e;
|
||||
uint32_t *e1 = e0 + EQm;
|
||||
uint32_t *e2 = e1 + EQm;
|
||||
uint32_t *e3 = e2 + EQm;
|
||||
uint32_t *e4 = e3 + EQm;
|
||||
uint32_t *e5 = e4 + EQm;
|
||||
int i = 0;
|
||||
/*
|
||||
#ifdef __AVX512VBMI__
|
||||
// clang-format off
|
||||
const __m512i p8a = _mm512_set_epi8(95, 31, 94, 30, 93, 29, 92, 28, 91, 27, 90, 26, 89, 25, 88, 24, 87, 23,
|
||||
86, 22, 85, 21, 84, 20, 83, 19, 82, 18, 81, 17, 80, 16, 79, 15, 78, 14,
|
||||
77, 13, 76, 12, 75, 11, 74, 10, 73, 9, 72, 8, 71, 7, 70, 6, 69, 5, 68, 4, 67, 3, 66, 2, 65, 1, 64, 0);
|
||||
const __m512i p8b = _mm512_set_epi8(127, 63, 126, 62, 125, 61, 124, 60, 123, 59, 122, 58, 121, 57, 120, 56, 119,
|
||||
55, 118, 54, 117, 53, 116, 52, 115, 51, 114, 50, 113, 49, 112, 48, 111, 47, 110,
|
||||
46, 109, 45, 108, 44, 107, 43, 106, 42, 105, 41, 104, 40, 103, 39, 102, 38, 101, 37, 100, 36, 99, 35, 98, 34, 97, 33, 96, 32);
|
||||
const __m512i p16a = _mm512_set_epi16(47, 15, 46, 14, 45, 13, 44, 12, 43, 11, 42, 10, 41, 9, 40, 8, 39, 7, 38, 6, 37, 5, 36, 4, 35, 3, 34, 2, 33, 1, 32, 0);
|
||||
const __m512i p16b = _mm512_set_epi16(63, 31, 62, 30, 61, 29, 60, 28, 59, 27, 58, 26, 57, 25, 56, 24, 55, 23, 54, 22, 53, 21, 52, 20, 51, 19, 50, 18, 49, 17, 48, 16);
|
||||
const __m512i p16c = _mm512_set_epi16(21, 20, 41, 19, 18, 40, 17, 16, 39, 15, 14, 38, 13, 12, 37, 11, 10, 36, 9, 8, 35, 7, 6, 34, 5, 4, 33, 3, 2, 32, 1, 0);
|
||||
const __m512i p16d = _mm512_set_epi16(10, 52, 9, 8, 51, 7, 6, 50, 5, 4, 49, 3, 2, 48, 1, 0, 47, 31, 30, 46, 29, 28, 45, 27, 26, 44, 25, 24, 43, 23, 22, 42);
|
||||
const __m512i p16d2 = _mm512_set_epi16(32 + 10, 30, 32 + 9, 32 + 8, 27, 32 + 7, 32 + 6, 24, 32 + 5, 32 + 4, 21, 32 + 3, 32 + 2, 18, 32 + 1, 32 + 0,
|
||||
15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);
|
||||
const __m512i p16e = _mm512_set_epi16(63, 31, 30, 62, 29, 28, 61, 27, 26, 60, 25, 24, 59, 23, 22, 58, 21, 20, 57, 19, 18, 56, 17, 16, 55, 15, 14, 54, 13, 12, 53, 11);
|
||||
// clang-format on
|
||||
__m512i *e0_512 = (__m512i *)e0;
|
||||
__m512i *e1_512 = (__m512i *)e1;
|
||||
__m512i *e2_512 = (__m512i *)e2;
|
||||
__m512i *e3_512 = (__m512i *)e3;
|
||||
__m512i *e4_512 = (__m512i *)e4;
|
||||
__m512i *e5_512 = (__m512i *)e5;
|
||||
__m512i *f_512 = (__m512i *)f;
|
||||
for (; i < (EQm & ~63); i += 64) {
|
||||
__m512i e0j = _mm512_loadu_si512(e0_512++);
|
||||
__m512i e1j = _mm512_loadu_si512(e1_512++);
|
||||
__m512i e2j = _mm512_loadu_si512(e2_512++);
|
||||
__m512i e3j = _mm512_loadu_si512(e3_512++);
|
||||
__m512i e4j = _mm512_loadu_si512(e4_512++);
|
||||
__m512i e5j = _mm512_loadu_si512(e5_512++);
|
||||
__m512i tmp0 = _mm512_permutex2var_epi8(e0j, p8a, e1j); // e0(i) e1(i) e0(i+1) e1(i+1) .... e0(i+31) e1(i+31)
|
||||
__m512i tmp1 = _mm512_permutex2var_epi8(e2j, p8a, e3j); // e2(i) e3(i) e2(i+1) e3(i+1) .... e2(i+31) e3(i+31)
|
||||
__m512i tmp2 = _mm512_permutex2var_epi8(e4j, p8a, e5j); // e4(i) e5(i) e4(i+1) e5(i+1) .... e4(i+31) e5(i+31)
|
||||
// e0(i) e1(i) e2(i) e3(i) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15)
|
||||
__m512i tmp3 = _mm512_permutex2var_epi16(tmp0, p16a, tmp1);
|
||||
// e0(i+16) e1(i+16) e2(i+16) e3(i+16) ... e0(i+31) e1(i+31) e2(i+31) e3(i+31)
|
||||
__m512i tmp4 = _mm512_permutex2var_epi16(tmp0, p16b, tmp1);
|
||||
// e0(i) e1(i) e2(i) e3(i) e4(i) e5(i) ... e0(i+9) e1(i+9) e2(i+9) e3(i+9) e4(i+9) e5(i+9) e0(i+10) e1(i+10)
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp3, p16c, tmp2));
|
||||
// e2(i+10) e3(i+10) e4(i+10) e5(i+10) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15) e4(i+15)
|
||||
// e5(i+15) x x x x e4(i+16) e5(i+16) x x x x .... e4(i+20) e5(i+20) x x
|
||||
__m512i tmp5 = _mm512_permutex2var_epi16(tmp3, p16d, tmp2);
|
||||
// e2(i+10) e3(i+10) e4(i+10) e5(i+10) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15)
|
||||
// e4(i+15) e5(i+15) e0(i+16) e1(i+16) e2(i+16) e3(i+16) e4(i+16) e5(i+16) e0(i+20)
|
||||
// e1(i+20) e2(i+20) e3(i+20) e4(i+20) e5(i+20) e0(i+21) e1(i+21)
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp5, p16d2, tmp4));
|
||||
// e2(i+21) e3(i+21) e4(i+21) e5(i+21) .... e0(i+31) e1(i+31) e2(i+31) e3(i+31) e4(i+31) e5(i+31)
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp4, p16e, tmp2));
|
||||
|
||||
tmp0 = _mm512_permutex2var_epi8(e0j, p8b, e1j); // e0(i+32) e1(i+32) e0(i+32) e1(i+32) .... e0(i+63) e1(i+63)
|
||||
tmp1 = _mm512_permutex2var_epi8(e2j, p8b, e3j); // e2(i+32) e3(i+32) e2(i+32) e3(i+32) .... e2(i+63) e3(i+63)
|
||||
tmp2 = _mm512_permutex2var_epi8(e4j, p8b, e5j); // e4(i+32) e5(i+32) e4(i+32) e5(i+32) .... e4(i+63) e5(i+63)
|
||||
tmp3 = _mm512_permutex2var_epi16(tmp0, p16a, tmp1); // e0(i) e1(i) e2(i) e3(i) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15)
|
||||
// e0(i+16) e1(i+16) e2(i+16) e3(i+16) ... e0(i+31) e1(i+31) e2(i+31) e3(i+31)
|
||||
tmp4 = _mm512_permutex2var_epi16(tmp0, p16b, tmp1);
|
||||
// e0(i) e1(i) e2(i) e3(i) e4(i) e5(i) ... e0(i+9) e1(i+9) e2(i+9) e3(i+9) e4(i+9) e5(i+9) e0(i+10) e1(i+10)
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp3, p16c, tmp2));
|
||||
// e2(i+10) e3(i+10) e4(i+10) e5(i+10) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15)
|
||||
// e4(i+15) e5(i+15) x x x x e4(i+16) e5(i+16) x x x x .... e4(i+20) e5(i+20) x x
|
||||
tmp5 = _mm512_permutex2var_epi16(tmp3, p16d, tmp2);
|
||||
// e2(i+10) e3(i+10) e4(i+10) e5(i+10) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15)
|
||||
// e4(i+15) e5(i+15) e0(i+16) e1(i+16) e2(i+16) e3(i+16) e4(i+16) e5(i+16) e0(i+20)
|
||||
// e1(i+20) e2(i+20) e3(i+20) e4(i+20) e5(i+20) e0(i+21) e1(i+21)
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp5, p16d2, tmp4));
|
||||
// e2(i+21) e3(i+21) e4(i+21) e5(i+21) .... e0(i+31) e1(i+31) e2(i+31) e3(i+31) e4(i+31) e5(i+31)
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi16(tmp4, p16e, tmp2));
|
||||
}
|
||||
e0 = (uint8_t *)e0_512;
|
||||
e1 = (uint8_t *)e1_512;
|
||||
e2 = (uint8_t *)e2_512;
|
||||
e3 = (uint8_t *)e3_512;
|
||||
e4 = (uint8_t *)e4_512;
|
||||
e5 = (uint8_t *)e5_512;
|
||||
f = (uint8_t *)f_512;
|
||||
#endif
|
||||
*/
|
||||
#ifdef USE128BIT
|
||||
simde__m128i *e0_128 = (simde__m128i *)e0;
|
||||
simde__m128i *e1_128 = (simde__m128i *)e1;
|
||||
simde__m128i *e2_128 = (simde__m128i *)e2;
|
||||
simde__m128i *e3_128 = (simde__m128i *)e3;
|
||||
simde__m128i *e4_128 = (simde__m128i *)e4;
|
||||
simde__m128i *e5_128 = (simde__m128i *)e5;
|
||||
simde__m128i *f128 = (simde__m128i *)f;
|
||||
for (; i < (EQm & ~3); i += 4) {
|
||||
simde__m128i e0j = simde_mm_loadu_si128(e0_128++);
|
||||
simde__m128i e1j = simde_mm_loadu_si128(e1_128++);
|
||||
simde__m128i e2j = simde_mm_loadu_si128(e2_128++);
|
||||
simde__m128i e3j = simde_mm_loadu_si128(e3_128++);
|
||||
simde__m128i e4j = simde_mm_loadu_si128(e4_128++);
|
||||
simde__m128i e5j = simde_mm_loadu_si128(e5_128++);
|
||||
|
||||
simde__m128i tmp0 = simde_mm_unpacklo_epi32(e0j, e1j); // e0(i) e1(i) e0(i+1) e1(i+1)
|
||||
simde__m128i tmp1 = simde_mm_unpacklo_epi32(e2j, e3j); // e2(i) e3(i) e2(i+1) e3(i+1)
|
||||
simde__m128i tmp2 = simde_mm_unpacklo_epi32(e4j, e5j); // e4(i) e5(i) e4(i+1) e5(i+1)
|
||||
|
||||
simde_mm_storeu_si128(f128++,simde_mm_unpacklo_epi64(tmp0, tmp1)); // e0(i) e1(i) e2(i) e3(i)
|
||||
simde_mm_storeu_si128(f128++,simde_mm_unpacklo_epi64(tmp2,simde_mm_unpackhi_epi64(tmp0,tmp0))); // e4(i) e5(i) e0(i+1) e1(i+1)
|
||||
simde_mm_storeu_si128(f128++,simde_mm_unpackhi_epi64(tmp1,tmp2)); // e2(i+1) e3(i+1) e4(i+1) e5(i+1)
|
||||
tmp0 = simde_mm_unpackhi_epi32(e0j, e1j); // e0(i+2) e1(i+2) e0(i+3) e1(i+3)
|
||||
tmp1 = simde_mm_unpackhi_epi32(e2j, e3j); // e2(i+2) e3(i+2) e2(i+3) e3(i+3)
|
||||
tmp2 = simde_mm_unpackhi_epi32(e4j, e5j); // e4(i+2) e5(i+2) e4(i+3) e5(i+3)
|
||||
|
||||
simde_mm_storeu_si128(f128++,simde_mm_unpacklo_epi64(tmp0, tmp1)); // e0(i+2) e1(i+2) e2(i+2) e3(i+2)
|
||||
simde_mm_storeu_si128(f128++,simde_mm_unpacklo_epi64(tmp2,simde_mm_unpackhi_epi64(tmp0,tmp0))); // e4(i+2) e5(i+2) e0(i+3) e1(i+3)
|
||||
simde_mm_storeu_si128(f128++,simde_mm_unpackhi_epi64(tmp1,tmp2)); // e2(i+3) e3(i+3) e4(i+3) e5(i+3)
|
||||
}
|
||||
e0 = (uint32_t *)e0_128;
|
||||
e1 = (uint32_t *)e1_128;
|
||||
e2 = (uint32_t *)e2_128;
|
||||
e3 = (uint32_t *)e3_128;
|
||||
e4 = (uint32_t *)e4_128;
|
||||
e5 = (uint32_t *)e5_128;
|
||||
f = (uint32_t *)f128;
|
||||
#endif
|
||||
for (; i < EQm; i++) {
|
||||
*f++ = *e0++;
|
||||
*f++ = *e1++;
|
||||
*f++ = *e2++;
|
||||
*f++ = *e3++;
|
||||
*f++ = *e4++;
|
||||
*f++ = *e5++;
|
||||
}
|
||||
} break;
|
||||
case 8: {
|
||||
uint32_t *e0 = e;
|
||||
uint32_t *e1 = e0 + EQm;
|
||||
uint32_t *e2 = e1 + EQm;
|
||||
uint32_t *e3 = e2 + EQm;
|
||||
uint32_t *e4 = e3 + EQm;
|
||||
uint32_t *e5 = e4 + EQm;
|
||||
uint32_t *e6 = e5 + EQm;
|
||||
uint32_t *e7 = e6 + EQm;
|
||||
|
||||
int i = 0;
|
||||
/*
|
||||
#ifdef __AVX512VBMI__
|
||||
// clang-format off
|
||||
const __m512i p8a = _mm512_set_epi8(95, 31, 94, 30, 93, 29, 92, 28, 91, 27, 90, 26, 89, 25, 88, 24, 87, 23,
|
||||
86, 22, 85, 21, 84, 20, 83, 19, 82, 18, 81, 17, 80, 16, 79, 15, 78, 14, 77, 13,
|
||||
76, 12, 75, 11, 74, 10, 73, 9, 72, 8, 71, 7, 70, 6, 69, 5, 68, 4, 67, 3, 66, 2, 65, 1, 64, 0);
|
||||
const __m512i p8b = _mm512_set_epi8(127, 63, 126, 62, 125, 61, 124, 60, 123, 59, 122, 58, 121, 57, 120, 56, 119, 55,
|
||||
118, 54, 117, 53, 116, 52, 115, 51, 114, 50, 113, 49, 112, 48, 111, 47, 110, 46,
|
||||
109, 45, 108, 44, 107, 43, 106, 42, 105, 41, 104, 40, 103, 39, 102, 38, 101, 37, 100, 36, 99, 35, 98, 34, 97, 33, 96, 32);
|
||||
|
||||
const __m512i p16a = _mm512_set_epi16(47, 15, 46, 14, 45, 13, 44, 12, 43, 11, 42, 10, 41, 9, 40, 8, 39, 7, 38, 6, 37, 5, 36, 4, 35, 3, 34, 2, 33, 1, 32, 0);
|
||||
const __m512i p16b = _mm512_set_epi16(63, 31, 62, 30, 61, 29, 60, 28, 59, 27, 58, 26, 57, 25, 56, 24, 55, 23, 54, 22, 53, 21, 52, 20, 51, 19, 50, 18, 49, 17, 48, 16);
|
||||
|
||||
const __m512i p32a = _mm512_set_epi32(23, 7, 22, 6, 21, 5, 20, 4, 19, 3, 18, 2, 17, 1, 16, 0);
|
||||
const __m512i p32b = _mm512_set_epi32(31, 15, 30, 14, 29, 13, 28, 12, 27, 11, 26, 10, 25, 9, 24, 8);
|
||||
// clang-format on
|
||||
__m512i *e0_512 = (__m512i *)e0;
|
||||
__m512i *e1_512 = (__m512i *)e1;
|
||||
__m512i *e2_512 = (__m512i *)e2;
|
||||
__m512i *e3_512 = (__m512i *)e3;
|
||||
__m512i *e4_512 = (__m512i *)e4;
|
||||
__m512i *e5_512 = (__m512i *)e5;
|
||||
__m512i *e6_512 = (__m512i *)e6;
|
||||
__m512i *e7_512 = (__m512i *)e7;
|
||||
__m512i *f_512 = (__m512i *)f;
|
||||
for (; i < (EQm & ~63); i += 64) {
|
||||
__m512i e0j = _mm512_loadu_si512(e0_512++);
|
||||
__m512i e1j = _mm512_loadu_si512(e1_512++);
|
||||
__m512i e2j = _mm512_loadu_si512(e2_512++);
|
||||
__m512i e3j = _mm512_loadu_si512(e3_512++);
|
||||
__m512i e4j = _mm512_loadu_si512(e4_512++);
|
||||
__m512i e5j = _mm512_loadu_si512(e5_512++);
|
||||
__m512i e6j = _mm512_loadu_si512(e6_512++);
|
||||
__m512i e7j = _mm512_loadu_si512(e7_512++);
|
||||
__m512i tmp0 = _mm512_permutex2var_epi8(e0j, p8a, e1j); // e0(i) e1(i) e0(i+1) e1(i+1) .... e0(i+15) e1(i+15)
|
||||
__m512i tmp1 = _mm512_permutex2var_epi8(e2j, p8a, e3j); // e2(i) e3(i) e2(i+1) e3(i+1) .... e2(i+15) e3(i+15)
|
||||
__m512i tmp2 = _mm512_permutex2var_epi8(e4j, p8a, e5j); // e4(i) e5(i) e4(i+1) e5(i+1) .... e4(i+15) e5(i+15)
|
||||
__m512i tmp3 = _mm512_permutex2var_epi8(e6j, p8a, e7j); // e6(i) e7(i) e6(i+1) e7(i+1) .... e6(i+15) e7(i+15)
|
||||
__m512i tmp4 = _mm512_permutex2var_epi16(tmp0, p16a, tmp1); // e0(i) e1(i) e2(i) e3(i) ... e0(i+7) e1(i+7) e2(i+7) e3(i+7)
|
||||
// e4(i) e5(i) e6(i) e7(i) ... e4(i+7) e5(i+7) e6(i+7) e7(i+7)
|
||||
// e0(i) e1(i) e2(i) e3(i) e4(i) e5(i) e6(i) e7(i)... e0(i+3) e1(i+3)
|
||||
__m512i tmp5 = _mm512_permutex2var_epi16(tmp2, p16a, tmp3);
|
||||
// e2(i+3) e3(i+3) e4(i+3) e5(i+3) e6(i+3) e7(i+3))
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi32(tmp4, p32a, tmp5));
|
||||
// e0(i+4) e1(i+4) e2(i+4) e3(i+4) e4(i+4) e5(i+4) e6(i+4) e7(i+4)...
|
||||
// e0(i+7) e1(i+7) e2(i+7) e3(i+7) e4(i+7) e5(i+7) e6(i+7) e7(i+7))
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi32(tmp4, p32b, tmp5));
|
||||
// e0(i+8) e1(i+8) e2(i+8) e3(i+8) ... e0(i+15) e1(i+15) e2(i+15) e3(i+15)
|
||||
tmp4 = _mm512_permutex2var_epi16(tmp0, p16b, tmp1);
|
||||
// e4(i+8) e5(i+8) e6(i+8) e7(i+8) ... e4(i+15) e5(i+15) e6(i+15) e7(i+15)
|
||||
tmp5 = _mm512_permutex2var_epi16(tmp2, p16b, tmp3);
|
||||
// e0(i+8) e1(i+8) e2(i+8) e3(i+8) e4(i+8) e5(i+8) e6(i+8) e7(i+8)... e0(i+11)
|
||||
// e1(i+11) e2(i+11) e3(i+11) e4(i+11) e5(i+11) e6(i+11) e7(i+11))
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi32(tmp4, p32a, tmp5));
|
||||
// e0(i+12) e1(i+12) e2(i+12) e3(i+12) e4(i+12) e5(i+12) e6(i+12) e7(i+12)... e0(i+15)
|
||||
// e1(i+15) e2(i+15) e3(i+15) e4(i+15) e5(i+15) e6(i+15) e7(i+15))
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi32(tmp4, p32b, tmp5));
|
||||
|
||||
tmp0 = _mm512_permutex2var_epi8(e0j, p8b, e1j); // e0(i+16) e1(i+16) e0(i+17) e1(i+17) .... e0(i+31) e1(i+31)
|
||||
tmp1 = _mm512_permutex2var_epi8(e2j, p8b, e3j); // e2(i+16) e3(i+16) e2(i+17) e3(i+17) .... e2(i+31) e3(i+31)
|
||||
tmp2 = _mm512_permutex2var_epi8(e4j, p8b, e5j); // e4(i+16) e5(i+16) e4(i+17) e5(i+17) .... e4(i+31) e5(i+31)
|
||||
tmp3 = _mm512_permutex2var_epi8(e6j, p8b, e7j); // e6(i+16) e7(i+16) e6(i+17) e7(i+17) .... e6(i+31) e7(i+31)
|
||||
// e0(i+!6) e1(i+16) e2(i+16) e3(i+16) ... e0(i+23) e1(i+23) e2(i+23) e3(i+23)
|
||||
tmp4 = _mm512_permutex2var_epi16(tmp0, p16a, tmp1);
|
||||
// e4(i+16) e5(i+16) e6(i+16) e7(i+16) ... e4(i+23) e5(i+23) e6(i+23) e7(i+23)
|
||||
tmp5 = _mm512_permutex2var_epi16(tmp2, p16a, tmp3);
|
||||
// e0(i+16) e1(i+16) e2(i+16) e3(i+16) e4(i+16) e5(i+16) e6(i+16) e7(i+16)... e0(i+19)
|
||||
// e1(i+19) e2(i+19) e3(i+19) e4(i+19) e5(i+19) e6(i+19) e7(i+19))
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi32(tmp4, p32a, tmp5));
|
||||
// e0(i+20) e1(i+20) e2(i+20) e3(i+20) e4(i+20) e5(i+20) e6(i+20) e7(i+20)... e0(i+23)
|
||||
// e1(i+23) e2(i+23) e3(i+23) e4(i+23) e5(i+23) e6(i+23) e7(i+23))
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi32(tmp4, p32b, tmp5));
|
||||
// e0(i+24) e1(i+24) e2(i+24) e3(i+24) ... e0(i+31) e1(i+31) e2(i+31) e3(i+31)
|
||||
tmp4 = _mm512_permutex2var_epi16(tmp0, p16b, tmp1);
|
||||
// e4(i+24) e5(i+24) e6(i+24) e7(i+24) ... e4(i+31) e5(i+31) e6(i+31) e7(i+31)
|
||||
tmp5 = _mm512_permutex2var_epi16(tmp2, p16b, tmp3);
|
||||
// e0(i+24) e1(i+24) e2(i+24) e3(i+24) e4(i+24) e5(i+24) e6(i+24) e7(i+24)... e0(i+27)
|
||||
// e1(i+27) e2(i+27) e3(i+27) e4(i+27) e5(i+27) e6(i+27) e7(i+27))
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi32(tmp4, p32a, tmp5));
|
||||
// e0(i+28) e1(i+28) e2(i+28) e3(i+28) e4(i+28) e5(i+28) e6(i+28) e7(i+28)... e0(i+31)
|
||||
// e1(i+31) e2(i+31) e3(i+31) e4(i+31) e5(i+31) e6(i+31) e7(i+31))
|
||||
_mm512_storeu_si512(f_512++, _mm512_permutex2var_epi32(tmp4, p32b, tmp5));
|
||||
}
|
||||
e0 = (uint8_t *)e0_512;
|
||||
e1 = (uint8_t *)e1_512;
|
||||
e2 = (uint8_t *)e2_512;
|
||||
e3 = (uint8_t *)e3_512;
|
||||
e4 = (uint8_t *)e4_512;
|
||||
e5 = (uint8_t *)e5_512;
|
||||
e6 = (uint8_t *)e6_512;
|
||||
e7 = (uint8_t *)e7_512;
|
||||
f = (uint8_t *)f_512;
|
||||
#endif
|
||||
*/
|
||||
#ifdef USE128BIT
|
||||
simde__m128i *e0_128 = (simde__m128i *)e0;
|
||||
simde__m128i *e1_128 = (simde__m128i *)e1;
|
||||
simde__m128i *e2_128 = (simde__m128i *)e2;
|
||||
simde__m128i *e3_128 = (simde__m128i *)e3;
|
||||
simde__m128i *e4_128 = (simde__m128i *)e4;
|
||||
simde__m128i *e5_128 = (simde__m128i *)e5;
|
||||
simde__m128i *e6_128 = (simde__m128i *)e6;
|
||||
simde__m128i *e7_128 = (simde__m128i *)e7;
|
||||
simde__m128i *f128 = (simde__m128i *)f;
|
||||
|
||||
for (; i < (EQm & ~3); i += 4) {
|
||||
simde__m128i e0j = simde_mm_loadu_si128(e0_128++);
|
||||
simde__m128i e1j = simde_mm_loadu_si128(e1_128++);
|
||||
simde__m128i e2j = simde_mm_loadu_si128(e2_128++);
|
||||
simde__m128i e3j = simde_mm_loadu_si128(e3_128++);
|
||||
simde__m128i e4j = simde_mm_loadu_si128(e4_128++);
|
||||
simde__m128i e5j = simde_mm_loadu_si128(e5_128++);
|
||||
simde__m128i e6j = simde_mm_loadu_si128(e6_128++);
|
||||
simde__m128i e7j = simde_mm_loadu_si128(e7_128++);
|
||||
|
||||
simde__m128i tmp0 = simde_mm_unpacklo_epi32(e0j, e1j); // e0(i) e1(i) e0(i+1) e1(i+1)
|
||||
simde__m128i tmp1 = simde_mm_unpacklo_epi32(e2j, e3j); // e2(i) e3(i) e2(i+1) e3(i+1)
|
||||
simde__m128i tmp2 = simde_mm_unpacklo_epi32(e4j, e5j); // e4(i) e5(i) e4(i+1) e5(i+1)
|
||||
simde__m128i tmp3 = simde_mm_unpacklo_epi32(e6j, e7j); // e6(i) e7(i) e6(i+1) e7(i+1)
|
||||
|
||||
simde_mm_storeu_si128(f128++,simde_mm_unpacklo_epi64(tmp0, tmp1)); // e0(i) e1(i) e2(i) e3(i)
|
||||
simde_mm_storeu_si128(f128++,simde_mm_unpacklo_epi64(tmp2, tmp3)); // e4(i) e5(i) e6(i) e7(i)
|
||||
simde_mm_storeu_si128(f128++,simde_mm_unpackhi_epi64(tmp0, tmp1)); // e0(i+1) e1(i+1) e2(i+1) e3(i+1)
|
||||
simde_mm_storeu_si128(f128++,simde_mm_unpackhi_epi64(tmp2, tmp3)); // e4(i+1) e5(i+1) e6(i+1) e7(i+1)
|
||||
//
|
||||
tmp0 = simde_mm_unpackhi_epi32(e0j, e1j); // e0(i+2) e1(i+2) e0(i+3) e1(i+3)
|
||||
tmp1 = simde_mm_unpackhi_epi32(e2j, e3j); // e2(i+2) e3(i+2) e2(i+3) e3(i+3)
|
||||
tmp2 = simde_mm_unpackhi_epi32(e4j, e5j); // e4(i+2) e5(i+2) e4(i+3) e5(i+3)
|
||||
tmp3 = simde_mm_unpackhi_epi32(e6j, e7j); // e6(i+2) e7(i+2) e6(i+3) e7(i+3)
|
||||
|
||||
simde_mm_storeu_si128(f128++,simde_mm_unpacklo_epi64(tmp0, tmp1)); // e0(i+2) e1(i+2) e2(i+2) e3(i+2)
|
||||
simde_mm_storeu_si128(f128++,simde_mm_unpacklo_epi64(tmp2, tmp3)); // e4(i+2) e5(i+2) e6(i+2) e7(i+2)
|
||||
simde_mm_storeu_si128(f128++,simde_mm_unpackhi_epi64(tmp0, tmp1)); // e0(i+3) e1(i+3) e2(i+3) e3(i+3)
|
||||
simde_mm_storeu_si128(f128++,simde_mm_unpackhi_epi64(tmp2, tmp3)); //e4(i+3) e5(i+3) e6(i+3) e7(i+3)
|
||||
}
|
||||
e0 = (uint32_t *)e0_128;
|
||||
e1 = (uint32_t *)e1_128;
|
||||
e2 = (uint32_t *)e2_128;
|
||||
e3 = (uint32_t *)e3_128;
|
||||
e4 = (uint32_t *)e4_128;
|
||||
e5 = (uint32_t *)e5_128;
|
||||
e6 = (uint32_t *)e6_128;
|
||||
e7 = (uint32_t *)e7_128;
|
||||
f = (uint32_t *)f128;
|
||||
#endif
|
||||
|
||||
for (; i < EQm; i++) {
|
||||
*f++ = *e0++;
|
||||
*f++ = *e1++;
|
||||
*f++ = *e2++;
|
||||
*f++ = *e3++;
|
||||
*f++ = *e4++;
|
||||
*f++ = *e5++;
|
||||
*f++ = *e6++;
|
||||
*f++ = *e7++;
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
AssertFatal(false, "Should be here!\n");
|
||||
}
|
||||
}
|
||||
void nr_deinterleaving_ldpc(uint32_t E, uint8_t Qm, int16_t *e, int16_t *f)
|
||||
{
|
||||
switch (Qm) {
|
||||
@@ -610,6 +1058,103 @@ int nr_rate_matching_ldpc(uint32_t Tbslbrm,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nr_rate_matching_ldpc32(uint32_t Tbslbrm,
|
||||
uint8_t BG,
|
||||
uint16_t Z,
|
||||
uint32_t *d,
|
||||
uint32_t *e,
|
||||
uint8_t C,
|
||||
uint32_t F,
|
||||
uint32_t Foffset,
|
||||
uint8_t rvidx,
|
||||
uint32_t E)
|
||||
{
|
||||
if (C == 0) {
|
||||
LOG_E(PHY, "nr_rate_matching: invalid parameter C %d\n", C);
|
||||
return -1;
|
||||
}
|
||||
|
||||
//Bit selection
|
||||
uint32_t N = (BG == 1) ? (66 * Z) : (50 * Z);
|
||||
uint32_t Ncb;
|
||||
if (Tbslbrm == 0)
|
||||
Ncb = N;
|
||||
else {
|
||||
uint32_t Nref = 3 * Tbslbrm / (2 * C); //R_LBRM = 2/3
|
||||
Ncb = min(N, Nref);
|
||||
}
|
||||
|
||||
uint32_t ind = (index_k0[BG - 1][rvidx] * Ncb / N) * Z;
|
||||
|
||||
#ifdef RM_DEBUG
|
||||
printf("nr_rate_matching_ldpc: E %u, F %u, Foffset %u, k0 %u, Ncb %u, rvidx %d, Tbslbrm %u\n",
|
||||
E,
|
||||
F,
|
||||
Foffset,
|
||||
ind,
|
||||
Ncb,
|
||||
rvidx,
|
||||
Tbslbrm);
|
||||
#endif
|
||||
|
||||
if (Foffset > E) {
|
||||
LOG_E(PHY,
|
||||
"nr_rate_matching: invalid parameters (Foffset %d > E %d) F %d, k0 %d, Ncb %d, rvidx %d, Tbslbrm %d\n",
|
||||
Foffset,
|
||||
E,
|
||||
F,
|
||||
ind,
|
||||
Ncb,
|
||||
rvidx,
|
||||
Tbslbrm);
|
||||
return -1;
|
||||
}
|
||||
if (Foffset > Ncb) {
|
||||
LOG_E(PHY, "nr_rate_matching: invalid parameters (Foffset %d > Ncb %d)\n", Foffset, Ncb);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ind >= Foffset && ind < (F + Foffset))
|
||||
ind = F + Foffset;
|
||||
|
||||
uint32_t k = 0;
|
||||
if (ind < Foffset) { // case where we have some bits before the filler and the rest after
|
||||
memcpy((void *)e, (void *)(d + ind), (Foffset - ind)<<2);
|
||||
|
||||
if (E + F <= Ncb - ind) { // E+F doesn't contain all coded bits
|
||||
memcpy((void *)(e + Foffset - ind), (void *)(d + Foffset + F), (E - Foffset + ind)<<2);
|
||||
k = E;
|
||||
} else {
|
||||
memcpy((void *)(e + Foffset - ind), (void *)(d + Foffset + F), (Ncb - Foffset - F)<<2);
|
||||
k = Ncb - F - ind;
|
||||
}
|
||||
} else {
|
||||
if (E <= Ncb - ind) { // E+F doesn't contain all coded bits
|
||||
memcpy((void *)(e), (void *)(d + ind), E<<2);
|
||||
k = E;
|
||||
} else {
|
||||
memcpy((void *)(e), (void *)(d + ind), (Ncb - ind)<<2);
|
||||
k = Ncb - ind;
|
||||
}
|
||||
}
|
||||
|
||||
while (k < E) { // case where we do repetitions (low mcs)
|
||||
for (ind = 0; (ind < Ncb) && (k < E); ind++) {
|
||||
#ifdef RM_DEBUG
|
||||
printf("RM_TX k%u Ind: %u (%d)\n", k, ind, d[ind]);
|
||||
#endif
|
||||
|
||||
if (ind == Foffset)
|
||||
ind = F + Foffset; // skip filler bits
|
||||
|
||||
e[k++] = d[ind];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nr_rate_matching_ldpc_rx(uint32_t Tbslbrm,
|
||||
uint8_t BG,
|
||||
uint16_t Z,
|
||||
|
||||
@@ -33,6 +33,15 @@
|
||||
*/
|
||||
void nr_interleaving_ldpc(uint32_t E, uint8_t Qm, uint8_t *e, uint8_t *f);
|
||||
|
||||
/**
|
||||
* \brief interleave a code segment after encoding and rate matching (32bit)
|
||||
* \param E size of the code segment in bits
|
||||
* \param Qm modulation order
|
||||
* \param e input rate matched segment
|
||||
* \param f output interleaved segment
|
||||
*/
|
||||
|
||||
void nr_interleaving_ldpc32(uint32_t E, uint8_t Qm, uint32_t *e, uint32_t *f);
|
||||
/**
|
||||
* \brief deinterleave a code segment before RX rate matching and decoding
|
||||
* \param E size of the code segment in bits
|
||||
@@ -66,6 +75,30 @@ int nr_rate_matching_ldpc(uint32_t Tbslbrm,
|
||||
uint8_t rvidx,
|
||||
uint32_t E);
|
||||
|
||||
/**
|
||||
* \brief rate match a code segment after encoding (32bit)
|
||||
* \Tbslbrm Transport Block size LBRM
|
||||
* \param BG LDPC base graph number
|
||||
* \param Z segment lifting size
|
||||
* \param d input encoded segment
|
||||
* \param e output rate matched segment
|
||||
* \param C number of segments in the Transport Block
|
||||
* \param F number of filler bits in the segment
|
||||
* \param Foffset offset of the filler bits in the segment
|
||||
* \param rvidx redundancy version index
|
||||
* \param E size of the code segment in bits
|
||||
*/
|
||||
int nr_rate_matching_ldpc32(uint32_t Tbslbrm,
|
||||
uint8_t BG,
|
||||
uint16_t Z,
|
||||
uint32_t *d,
|
||||
uint32_t *e,
|
||||
uint8_t C,
|
||||
uint32_t F,
|
||||
uint32_t Foffset,
|
||||
uint8_t rvidx,
|
||||
uint32_t E);
|
||||
|
||||
/**
|
||||
* \brief rate match a code segment before decoding
|
||||
* \Tbslbrm Transport Block size LBRM
|
||||
|
||||
@@ -7,7 +7,7 @@ add_boolean_option(ENABLE_LDPC_T2 OFF "Build support for LDPC Offload to T2 libr
|
||||
|
||||
if (ENABLE_LDPC_T2)
|
||||
|
||||
pkg_check_modules(LIBDPDK_T2 REQUIRED libdpdk=20.11.9)
|
||||
pkg_check_modules(LIBDPDK_T2 REQUIRED libdpdk>=20.11.9)
|
||||
|
||||
find_library(PMD_T2 NAMES rte_baseband_accl_ldpc HINTS ${LIBDPDK_T2_LIBRARY_DIRS})
|
||||
if (NOT PMD_T2)
|
||||
|
||||
@@ -45,8 +45,6 @@
|
||||
#define SYNC_WAIT 0
|
||||
#define SYNC_START 1
|
||||
#define TIME_OUT_POLL 1e8
|
||||
/* Increment for next code block in external HARQ memory */
|
||||
#define HARQ_INCR 32768
|
||||
/* Headroom for filler LLRs insertion in HARQ buffer */
|
||||
#define FILLER_HEADROOM 1024
|
||||
/* Number of segments that could be stored in HARQ combined buffers */
|
||||
@@ -55,15 +53,6 @@
|
||||
pthread_mutex_t encode_mutex;
|
||||
pthread_mutex_t decode_mutex;
|
||||
|
||||
const char *typeStr[] = {
|
||||
"RTE_BBDEV_OP_NONE", /**< Dummy operation that does nothing */
|
||||
"RTE_BBDEV_OP_TURBO_DEC", /**< Turbo decode */
|
||||
"RTE_BBDEV_OP_TURBO_ENC", /**< Turbo encode */
|
||||
"RTE_BBDEV_OP_LDPC_DEC", /**< LDPC decode */
|
||||
"RTE_BBDEV_OP_LDPC_ENC", /**< LDPC encode */
|
||||
"RTE_BBDEV_OP_TYPE_COUNT", /**< Count of different op types */
|
||||
};
|
||||
|
||||
/* Represents tested active devices */
|
||||
struct active_device {
|
||||
const char *driver_name;
|
||||
@@ -76,9 +65,6 @@ struct active_device {
|
||||
struct rte_mempool *bbdev_enc_op_pool;
|
||||
struct rte_mempool *in_mbuf_pool;
|
||||
struct rte_mempool *hard_out_mbuf_pool;
|
||||
struct rte_mempool *soft_out_mbuf_pool;
|
||||
struct rte_mempool *harq_in_mbuf_pool;
|
||||
struct rte_mempool *harq_out_mbuf_pool;
|
||||
} active_devs[RTE_BBDEV_MAX_DEVS];
|
||||
static int nb_active_devs;
|
||||
|
||||
@@ -86,23 +72,12 @@ static int nb_active_devs;
|
||||
struct data_buffers {
|
||||
struct rte_bbdev_op_data *inputs;
|
||||
struct rte_bbdev_op_data *hard_outputs;
|
||||
struct rte_bbdev_op_data *soft_outputs;
|
||||
struct rte_bbdev_op_data *harq_inputs;
|
||||
struct rte_bbdev_op_data *harq_outputs;
|
||||
};
|
||||
|
||||
/* Operation parameters specific for given test case */
|
||||
struct test_op_params {
|
||||
struct rte_mempool *mp_dec;
|
||||
struct rte_mempool *mp_enc;
|
||||
struct rte_bbdev_dec_op *ref_dec_op;
|
||||
struct rte_bbdev_enc_op *ref_enc_op;
|
||||
uint16_t burst_sz;
|
||||
uint16_t num_to_process;
|
||||
uint16_t num_lcores;
|
||||
int vector_mask;
|
||||
rte_atomic16_t sync;
|
||||
struct data_buffers q_bufs[RTE_MAX_NUMA_NODES][MAX_QUEUES];
|
||||
};
|
||||
|
||||
/* Contains per lcore params */
|
||||
@@ -113,18 +88,14 @@ struct thread_params {
|
||||
nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters;
|
||||
nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters;
|
||||
uint8_t iter_count;
|
||||
rte_atomic16_t nb_dequeued;
|
||||
rte_atomic16_t processing_status;
|
||||
rte_atomic16_t burst_sz;
|
||||
struct test_op_params *op_params;
|
||||
struct rte_bbdev_dec_op *dec_ops[MAX_BURST];
|
||||
struct rte_bbdev_enc_op *enc_ops[MAX_BURST];
|
||||
struct data_buffers *data_buffers;
|
||||
struct rte_mempool *bbdev_op_pool;
|
||||
};
|
||||
|
||||
static uint16_t nb_segments_decoding(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters) {
|
||||
uint16_t nb_segments = 0;
|
||||
for (uint16_t h = 0; h < nrLDPC_slot_decoding_parameters->nb_TBs; ++h)
|
||||
{
|
||||
for (int h = 0; h < nrLDPC_slot_decoding_parameters->nb_TBs; ++h) {
|
||||
nb_segments+=nrLDPC_slot_decoding_parameters->TBs[h].C;
|
||||
}
|
||||
return nb_segments;
|
||||
@@ -132,33 +103,12 @@ static uint16_t nb_segments_decoding(nrLDPC_slot_decoding_parameters_t *nrLDPC_s
|
||||
|
||||
static uint16_t nb_segments_encoding(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters) {
|
||||
uint16_t nb_segments = 0;
|
||||
for (uint16_t h = 0; h < nrLDPC_slot_encoding_parameters->nb_TBs; ++h)
|
||||
{
|
||||
for (int h = 0; h < nrLDPC_slot_encoding_parameters->nb_TBs; ++h) {
|
||||
nb_segments+=nrLDPC_slot_encoding_parameters->TBs[h].C;
|
||||
}
|
||||
return nb_segments;
|
||||
}
|
||||
|
||||
// DPDK BBDEV copy
|
||||
static inline void
|
||||
mbuf_reset(struct rte_mbuf *m)
|
||||
{
|
||||
m->pkt_len = 0;
|
||||
|
||||
do {
|
||||
m->data_len = 0;
|
||||
m = m->next;
|
||||
} while (m != NULL);
|
||||
}
|
||||
|
||||
/* Read flag value 0/1 from bitmap */
|
||||
// DPDK BBDEV copy
|
||||
static inline bool
|
||||
check_bit(uint32_t bitmap, uint32_t bitmask)
|
||||
{
|
||||
return bitmap & bitmask;
|
||||
}
|
||||
|
||||
/* calculates optimal mempool size not smaller than the val */
|
||||
// DPDK BBDEV copy
|
||||
static unsigned int
|
||||
@@ -298,7 +248,7 @@ static int add_dev(uint8_t dev_id, struct rte_bbdev_info *info)
|
||||
|
||||
/* Display for debug the capabilities of the card */
|
||||
for (int i = 0; info->drv.capabilities[i].type != RTE_BBDEV_OP_NONE; i++) {
|
||||
printf("device: %d, capability[%d]=%s\n", dev_id, i, typeStr[info->drv.capabilities[i].type]);
|
||||
printf("device: %d, capability[%d]=%s\n", dev_id, i, rte_bbdev_op_type_str(info->drv.capabilities[i].type));
|
||||
if (info->drv.capabilities[i].type == RTE_BBDEV_OP_LDPC_ENC) {
|
||||
const struct rte_bbdev_op_cap_ldpc_enc cap = info->drv.capabilities[i].cap.ldpc_enc;
|
||||
printf(" buffers: src = %d, dst = %d\n capabilites: ", cap.num_buffers_src, cap.num_buffers_dst);
|
||||
@@ -376,9 +326,9 @@ static int init_op_data_objs_dec(struct rte_bbdev_op_data *bufs,
|
||||
uint16_t min_alignment)
|
||||
{
|
||||
bool large_input = false;
|
||||
uint16_t j = 0;
|
||||
for (uint16_t h = 0; h < nrLDPC_slot_decoding_parameters->nb_TBs; ++h) {
|
||||
for (uint16_t i = 0; i < nrLDPC_slot_decoding_parameters->TBs[h].C; ++i) {
|
||||
int j = 0;
|
||||
for (int h = 0; h < nrLDPC_slot_decoding_parameters->nb_TBs; ++h) {
|
||||
for (int i = 0; i < nrLDPC_slot_decoding_parameters->TBs[h].C; ++i) {
|
||||
uint32_t data_len = nrLDPC_slot_decoding_parameters->TBs[h].segments[i].E;
|
||||
char *data;
|
||||
struct rte_mbuf *m_head = rte_pktmbuf_alloc(mbuf_pool);
|
||||
@@ -395,9 +345,9 @@ static int init_op_data_objs_dec(struct rte_bbdev_op_data *bufs,
|
||||
bufs[j].data = m_head;
|
||||
bufs[j].offset = 0;
|
||||
bufs[j].length = 0;
|
||||
|
||||
if ((op_type == DATA_INPUT) || (op_type == DATA_HARQ_INPUT)) {
|
||||
if ((op_type == DATA_INPUT) && large_input) {
|
||||
|
||||
if (op_type == DATA_INPUT) {
|
||||
if (large_input) {
|
||||
/* Allocate a fake overused mbuf */
|
||||
data = rte_malloc(NULL, data_len, 0);
|
||||
AssertFatal(data != NULL, "rte malloc failed with %u bytes", data_len);
|
||||
@@ -427,14 +377,13 @@ static int init_op_data_objs_dec(struct rte_bbdev_op_data *bufs,
|
||||
// based on DPDK BBDEV init_op_data_objs
|
||||
static int init_op_data_objs_enc(struct rte_bbdev_op_data *bufs,
|
||||
nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters,
|
||||
struct rte_mbuf *m_head,
|
||||
struct rte_mempool *mbuf_pool,
|
||||
enum op_data_type op_type,
|
||||
uint16_t min_alignment)
|
||||
{
|
||||
bool large_input = false;
|
||||
uint16_t j = 0;
|
||||
for (uint16_t h = 0; h < nrLDPC_slot_encoding_parameters->nb_TBs; ++h) {
|
||||
int j = 0;
|
||||
for (int h = 0; h < nrLDPC_slot_encoding_parameters->nb_TBs; ++h) {
|
||||
for (int i = 0; i < nrLDPC_slot_encoding_parameters->TBs[h].C; ++i) {
|
||||
uint32_t data_len = (nrLDPC_slot_encoding_parameters->TBs[h].K - nrLDPC_slot_encoding_parameters->TBs[h].F + 7) / 8;
|
||||
char *data;
|
||||
@@ -452,9 +401,9 @@ static int init_op_data_objs_enc(struct rte_bbdev_op_data *bufs,
|
||||
bufs[j].data = m_head;
|
||||
bufs[j].offset = 0;
|
||||
bufs[j].length = 0;
|
||||
|
||||
if ((op_type == DATA_INPUT) || (op_type == DATA_HARQ_INPUT)) {
|
||||
if ((op_type == DATA_INPUT) && large_input) {
|
||||
|
||||
if (op_type == DATA_INPUT) {
|
||||
if (large_input) {
|
||||
/* Allocate a fake overused mbuf */
|
||||
data = rte_malloc(NULL, data_len, 0);
|
||||
AssertFatal(data != NULL, "rte malloc failed with %u bytes", data_len);
|
||||
@@ -502,40 +451,24 @@ static int allocate_buffers_on_socket(struct rte_bbdev_op_data **buffers, const
|
||||
}
|
||||
|
||||
// DPDK BBDEV copy
|
||||
static void
|
||||
free_buffers(struct active_device *ad, struct test_op_params *op_params)
|
||||
static void free_mempools(struct active_device *ad)
|
||||
{
|
||||
rte_mempool_free(ad->bbdev_dec_op_pool);
|
||||
rte_mempool_free(ad->bbdev_enc_op_pool);
|
||||
rte_mempool_free(ad->in_mbuf_pool);
|
||||
rte_mempool_free(ad->hard_out_mbuf_pool);
|
||||
rte_mempool_free(ad->soft_out_mbuf_pool);
|
||||
rte_mempool_free(ad->harq_in_mbuf_pool);
|
||||
rte_mempool_free(ad->harq_out_mbuf_pool);
|
||||
|
||||
for (int i = 2; i < rte_lcore_count(); ++i) {
|
||||
for (int j = 0; j < RTE_MAX_NUMA_NODES; ++j) {
|
||||
rte_free(op_params->q_bufs[j][i].inputs);
|
||||
rte_free(op_params->q_bufs[j][i].hard_outputs);
|
||||
rte_free(op_params->q_bufs[j][i].soft_outputs);
|
||||
rte_free(op_params->q_bufs[j][i].harq_inputs);
|
||||
rte_free(op_params->q_bufs[j][i].harq_outputs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// based on DPDK BBDEV copy_reference_ldpc_dec_op
|
||||
static void
|
||||
set_ldpc_dec_op(struct rte_bbdev_dec_op **ops,
|
||||
unsigned int start_idx,
|
||||
struct data_buffers *bufs,
|
||||
struct rte_bbdev_op_data *inputs,
|
||||
struct rte_bbdev_op_data *outputs,
|
||||
nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters)
|
||||
{
|
||||
unsigned int h;
|
||||
unsigned int i;
|
||||
unsigned int j = 0;
|
||||
for (h = 0; h < nrLDPC_slot_decoding_parameters->nb_TBs; ++h){
|
||||
for (i = 0; i < nrLDPC_slot_decoding_parameters->TBs[h].C; ++i) {
|
||||
int j = 0;
|
||||
for (int h = 0; h < nrLDPC_slot_decoding_parameters->nb_TBs; ++h) {
|
||||
for (int i = 0; i < nrLDPC_slot_decoding_parameters->TBs[h].C; ++i) {
|
||||
ops[j]->ldpc_dec.cb_params.e = nrLDPC_slot_decoding_parameters->TBs[h].segments[i].E;
|
||||
ops[j]->ldpc_dec.basegraph = nrLDPC_slot_decoding_parameters->TBs[h].BG;
|
||||
ops[j]->ldpc_dec.z_c = nrLDPC_slot_decoding_parameters->TBs[h].Z;
|
||||
@@ -571,16 +504,8 @@ set_ldpc_dec_op(struct rte_bbdev_dec_op **ops,
|
||||
ops[j]->ldpc_dec.harq_combined_input.offset = harq_combined_offset;
|
||||
ops[j]->ldpc_dec.harq_combined_output.offset = harq_combined_offset;
|
||||
|
||||
if (bufs->hard_outputs != NULL)
|
||||
ops[j]->ldpc_dec.hard_output = bufs->hard_outputs[start_idx + j];
|
||||
if (bufs->inputs != NULL)
|
||||
ops[j]->ldpc_dec.input = bufs->inputs[start_idx + j];
|
||||
if (bufs->soft_outputs != NULL)
|
||||
ops[j]->ldpc_dec.soft_output = bufs->soft_outputs[start_idx + j];
|
||||
if (bufs->harq_inputs != NULL)
|
||||
ops[j]->ldpc_dec.harq_combined_input = bufs->harq_inputs[start_idx + j];
|
||||
if (bufs->harq_outputs != NULL)
|
||||
ops[j]->ldpc_dec.harq_combined_output = bufs->harq_outputs[start_idx + j];
|
||||
ops[j]->ldpc_dec.hard_output = outputs[j];
|
||||
ops[j]->ldpc_dec.input = inputs[j];
|
||||
++j;
|
||||
}
|
||||
}
|
||||
@@ -589,16 +514,13 @@ set_ldpc_dec_op(struct rte_bbdev_dec_op **ops,
|
||||
// based on DPDK BBDEV copy_reference_ldpc_enc_op
|
||||
static void
|
||||
set_ldpc_enc_op(struct rte_bbdev_enc_op **ops,
|
||||
unsigned int start_idx,
|
||||
struct rte_bbdev_op_data *inputs,
|
||||
struct rte_bbdev_op_data *outputs,
|
||||
nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters)
|
||||
{
|
||||
unsigned int h;
|
||||
unsigned int i;
|
||||
unsigned int j = 0;
|
||||
for (h = 0; h < nrLDPC_slot_encoding_parameters->nb_TBs; ++h){
|
||||
for (i = 0; i < nrLDPC_slot_encoding_parameters->TBs[h].C; ++i) {
|
||||
int j = 0;
|
||||
for (int h = 0; h < nrLDPC_slot_encoding_parameters->nb_TBs; ++h) {
|
||||
for (int i = 0; i < nrLDPC_slot_encoding_parameters->TBs[h].C; ++i) {
|
||||
ops[j]->ldpc_enc.cb_params.e = nrLDPC_slot_encoding_parameters->TBs[h].segments[i].E;
|
||||
ops[j]->ldpc_enc.basegraph = nrLDPC_slot_encoding_parameters->TBs[h].BG;
|
||||
ops[j]->ldpc_enc.z_c = nrLDPC_slot_encoding_parameters->TBs[h].Z;
|
||||
@@ -612,34 +534,23 @@ set_ldpc_enc_op(struct rte_bbdev_enc_op **ops,
|
||||
ops[j]->ldpc_enc.rv_index = nrLDPC_slot_encoding_parameters->TBs[h].rv_index;
|
||||
ops[j]->ldpc_enc.op_flags = RTE_BBDEV_LDPC_RATE_MATCH;
|
||||
ops[j]->ldpc_enc.code_block_mode = 1;
|
||||
ops[j]->ldpc_enc.output = outputs[start_idx + j];
|
||||
ops[j]->ldpc_enc.input = inputs[start_idx + j];
|
||||
ops[j]->ldpc_enc.output = outputs[j];
|
||||
ops[j]->ldpc_enc.input = inputs[j];
|
||||
++j;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
retrieve_ldpc_dec_op(struct rte_bbdev_dec_op **ops,
|
||||
const int vector_mask,
|
||||
nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters)
|
||||
static int retrieve_ldpc_dec_op(struct rte_bbdev_dec_op **ops, nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters)
|
||||
{
|
||||
struct rte_bbdev_op_data *hard_output;
|
||||
uint16_t data_len = 0;
|
||||
struct rte_mbuf *m;
|
||||
char *data;
|
||||
unsigned int h;
|
||||
unsigned int i;
|
||||
unsigned int j = 0;
|
||||
for (h = 0; h < nrLDPC_slot_decoding_parameters->nb_TBs; ++h){
|
||||
for (i = 0; i < nrLDPC_slot_decoding_parameters->TBs[h].C; ++i) {
|
||||
hard_output = &ops[j]->ldpc_dec.hard_output;
|
||||
m = hard_output->data;
|
||||
data_len = rte_pktmbuf_data_len(m) - hard_output->offset;
|
||||
data = m->buf_addr;
|
||||
memcpy(nrLDPC_slot_decoding_parameters->TBs[h].segments[i].c, data + m->data_off, data_len);
|
||||
rte_pktmbuf_free(ops[j]->ldpc_dec.hard_output.data);
|
||||
rte_pktmbuf_free(ops[j]->ldpc_dec.input.data);
|
||||
int j = 0;
|
||||
for (int h = 0; h < nrLDPC_slot_decoding_parameters->nb_TBs; ++h) {
|
||||
for (int i = 0; i < nrLDPC_slot_decoding_parameters->TBs[h].C; ++i) {
|
||||
struct rte_bbdev_op_data *hard_output = &ops[j]->ldpc_dec.hard_output;
|
||||
struct rte_mbuf *m = hard_output->data;
|
||||
uint16_t data_len = rte_pktmbuf_data_len(m) - hard_output->offset;
|
||||
uint8_t *data = rte_pktmbuf_mtod_offset(m, uint8_t *, hard_output->offset);
|
||||
memcpy(nrLDPC_slot_decoding_parameters->TBs[h].segments[i].c, data, data_len);
|
||||
++j;
|
||||
}
|
||||
}
|
||||
@@ -651,17 +562,17 @@ retrieve_ldpc_enc_op(struct rte_bbdev_enc_op **ops,
|
||||
nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters)
|
||||
{
|
||||
uint8_t *p_out = NULL;
|
||||
unsigned int j = 0;
|
||||
for (unsigned int h = 0; h < nrLDPC_slot_encoding_parameters->nb_TBs; ++h){
|
||||
int j = 0;
|
||||
for (int h = 0; h < nrLDPC_slot_encoding_parameters->nb_TBs; ++h){
|
||||
int E_sum = 0;
|
||||
int bit_offset = 0;
|
||||
int byte_offset = 0;
|
||||
p_out = nrLDPC_slot_encoding_parameters->TBs[h].output;
|
||||
for (unsigned int r = 0; r < nrLDPC_slot_encoding_parameters->TBs[h].C; ++r) {
|
||||
for (int r = 0; r < nrLDPC_slot_encoding_parameters->TBs[h].C; ++r) {
|
||||
struct rte_bbdev_op_data *output = &ops[j]->ldpc_enc.output;
|
||||
struct rte_mbuf *m = output->data;
|
||||
uint16_t data_len = rte_pktmbuf_data_len(m) - output->offset;
|
||||
uint8_t *data = m->buf_addr + m->data_off;
|
||||
uint8_t *data = rte_pktmbuf_mtod_offset(m, uint8_t *, output->offset);
|
||||
reverse_bits_u8(data, data_len, data);
|
||||
if (bit_offset == 0) {
|
||||
memcpy(&p_out[byte_offset], data, data_len);
|
||||
@@ -688,93 +599,58 @@ retrieve_ldpc_enc_op(struct rte_bbdev_enc_op **ops,
|
||||
E_sum += nrLDPC_slot_encoding_parameters->TBs[h].segments[r].E;
|
||||
byte_offset = (E_sum + 7) / 8;
|
||||
bit_offset = E_sum % 8;
|
||||
rte_pktmbuf_free(m);
|
||||
rte_pktmbuf_free(ops[j]->ldpc_enc.input.data);
|
||||
++j;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// based on DPDK BBDEV init_test_op_params
|
||||
static int init_test_op_params(struct test_op_params *op_params,
|
||||
enum rte_bbdev_op_type op_type,
|
||||
struct rte_mempool *ops_mp,
|
||||
uint16_t burst_sz,
|
||||
uint16_t num_to_process,
|
||||
uint16_t num_lcores)
|
||||
{
|
||||
int ret = 0;
|
||||
if (op_type == RTE_BBDEV_OP_LDPC_DEC) {
|
||||
ret = rte_bbdev_dec_op_alloc_bulk(ops_mp, &op_params->ref_dec_op, num_to_process);
|
||||
op_params->mp_dec = ops_mp;
|
||||
} else {
|
||||
ret = rte_bbdev_enc_op_alloc_bulk(ops_mp, &op_params->ref_enc_op, 1);
|
||||
op_params->mp_enc = ops_mp;
|
||||
}
|
||||
|
||||
AssertFatal(ret == 0, "rte_bbdev_op_alloc_bulk() failed");
|
||||
|
||||
op_params->burst_sz = burst_sz;
|
||||
op_params->num_to_process = num_to_process;
|
||||
op_params->num_lcores = num_lcores;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// based on DPDK BBDEV throughput_pmd_lcore_ldpc_dec
|
||||
static int
|
||||
pmd_lcore_ldpc_dec(void *arg)
|
||||
{
|
||||
struct thread_params *tp = arg;
|
||||
nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters = tp->nrLDPC_slot_decoding_parameters;
|
||||
uint16_t enq, deq;
|
||||
int time_out = 0;
|
||||
const uint16_t queue_id = tp->queue_id;
|
||||
const uint16_t num_segments = nb_segments_decoding(nrLDPC_slot_decoding_parameters);
|
||||
struct rte_bbdev_dec_op **ops_enq;
|
||||
struct rte_bbdev_dec_op **ops_deq;
|
||||
ops_enq = (struct rte_bbdev_dec_op **)rte_calloc("struct rte_bbdev_dec_op **ops_enq", num_segments, sizeof(struct rte_bbdev_dec_op *), RTE_CACHE_LINE_SIZE);
|
||||
ops_deq = (struct rte_bbdev_dec_op **)rte_calloc("struct rte_bbdev_dec_op **ops_dec", num_segments, sizeof(struct rte_bbdev_dec_op *), RTE_CACHE_LINE_SIZE);
|
||||
struct data_buffers *bufs = NULL;
|
||||
uint16_t h, i, j;
|
||||
int ret;
|
||||
struct rte_bbdev_info info;
|
||||
uint16_t num_to_enq;
|
||||
struct rte_bbdev_dec_op *ops_enq[num_segments];
|
||||
struct rte_bbdev_dec_op *ops_deq[num_segments];
|
||||
struct data_buffers *bufs = tp->data_buffers;
|
||||
|
||||
AssertFatal((num_segments < MAX_BURST), "BURST_SIZE should be <= %u", MAX_BURST);
|
||||
|
||||
struct rte_bbdev_info info;
|
||||
rte_bbdev_info_get(tp->dev_id, &info);
|
||||
|
||||
bufs = &tp->op_params->q_bufs[GET_SOCKET(info.socket_id)][queue_id];
|
||||
while (rte_atomic16_read(&tp->op_params->sync) == SYNC_WAIT)
|
||||
rte_pause();
|
||||
|
||||
ret = rte_bbdev_dec_op_alloc_bulk(tp->op_params->mp_dec, ops_enq, num_segments);
|
||||
int ret = rte_bbdev_dec_op_alloc_bulk(tp->bbdev_op_pool, ops_enq, num_segments);
|
||||
AssertFatal(ret == 0, "Allocation failed for %d ops", num_segments);
|
||||
set_ldpc_dec_op(ops_enq, 0, bufs, nrLDPC_slot_decoding_parameters);
|
||||
|
||||
for (enq = 0, deq = 0; enq < num_segments;) {
|
||||
num_to_enq = num_segments;
|
||||
if (unlikely(num_segments - enq < num_to_enq))
|
||||
num_to_enq = num_segments - enq;
|
||||
set_ldpc_dec_op(ops_enq, bufs->inputs, bufs->hard_outputs, nrLDPC_slot_decoding_parameters);
|
||||
|
||||
uint16_t enq = 0, deq = 0;
|
||||
while (enq < num_segments) {
|
||||
uint16_t num_to_enq = num_segments - enq;
|
||||
enq += rte_bbdev_enqueue_ldpc_dec_ops(tp->dev_id, queue_id, &ops_enq[enq], num_to_enq);
|
||||
deq += rte_bbdev_dequeue_ldpc_dec_ops(tp->dev_id, queue_id, &ops_deq[deq], enq - deq);
|
||||
}
|
||||
|
||||
/* dequeue the remaining */
|
||||
while (deq < enq) {
|
||||
deq += rte_bbdev_dequeue_ldpc_dec_ops(tp->dev_id, queue_id, &ops_deq[deq], enq - deq);
|
||||
time_out++;
|
||||
DevAssert(time_out <= TIME_OUT_POLL);
|
||||
}
|
||||
|
||||
if (deq == enq) {
|
||||
ret = retrieve_ldpc_dec_op(ops_deq, tp->op_params->vector_mask, nrLDPC_slot_decoding_parameters);
|
||||
ret = retrieve_ldpc_dec_op(ops_deq, nrLDPC_slot_decoding_parameters);
|
||||
AssertFatal(ret == 0, "LDPC offload decoder failed!");
|
||||
tp->iter_count = 0;
|
||||
/* get the max of iter_count for all dequeued ops */
|
||||
j = 0;
|
||||
for (h = 0; h < nrLDPC_slot_decoding_parameters->nb_TBs; ++h){
|
||||
for (i = 0; i < nrLDPC_slot_decoding_parameters->TBs[h].C; ++i) {
|
||||
int j = 0;
|
||||
for (int h = 0; h < nrLDPC_slot_decoding_parameters->nb_TBs; ++h) {
|
||||
for (int i = 0; i < nrLDPC_slot_decoding_parameters->TBs[h].C; ++i) {
|
||||
bool *status = &nrLDPC_slot_decoding_parameters->TBs[h].segments[i].decodeSuccess;
|
||||
tp->iter_count = RTE_MAX(ops_enq[j]->ldpc_dec.iter_count, tp->iter_count);
|
||||
|
||||
@@ -804,8 +680,6 @@ pmd_lcore_ldpc_dec(void *arg)
|
||||
}
|
||||
|
||||
rte_bbdev_dec_op_free_bulk(ops_enq, num_segments);
|
||||
rte_free(ops_enq);
|
||||
rte_free(ops_deq);
|
||||
// Return the worst decoding number of iterations for all segments
|
||||
return tp->iter_count;
|
||||
}
|
||||
@@ -815,37 +689,33 @@ static int pmd_lcore_ldpc_enc(void *arg)
|
||||
{
|
||||
struct thread_params *tp = arg;
|
||||
nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters = tp->nrLDPC_slot_encoding_parameters;
|
||||
uint16_t enq, deq;
|
||||
int time_out = 0;
|
||||
const uint16_t queue_id = tp->queue_id;
|
||||
const uint16_t num_segments = nb_segments_encoding(nrLDPC_slot_encoding_parameters);
|
||||
struct rte_bbdev_enc_op **ops_enq;
|
||||
struct rte_bbdev_enc_op **ops_deq;
|
||||
ops_enq = (struct rte_bbdev_enc_op **)rte_calloc("struct rte_bbdev_dec_op **ops_enq", num_segments, sizeof(struct rte_bbdev_enc_op *), RTE_CACHE_LINE_SIZE);
|
||||
ops_deq = (struct rte_bbdev_enc_op **)rte_calloc("struct rte_bbdev_dec_op **ops_dec", num_segments, sizeof(struct rte_bbdev_enc_op *), RTE_CACHE_LINE_SIZE);
|
||||
struct rte_bbdev_info info;
|
||||
int ret;
|
||||
struct data_buffers *bufs = NULL;
|
||||
uint16_t num_to_enq;
|
||||
struct rte_bbdev_enc_op *ops_enq[num_segments];
|
||||
struct rte_bbdev_enc_op *ops_deq[num_segments];
|
||||
struct data_buffers *bufs = tp->data_buffers;
|
||||
|
||||
AssertFatal((num_segments < MAX_BURST), "BURST_SIZE should be <= %u", MAX_BURST);
|
||||
|
||||
struct rte_bbdev_info info;
|
||||
rte_bbdev_info_get(tp->dev_id, &info);
|
||||
bufs = &tp->op_params->q_bufs[GET_SOCKET(info.socket_id)][queue_id];
|
||||
|
||||
while (rte_atomic16_read(&tp->op_params->sync) == SYNC_WAIT)
|
||||
rte_pause();
|
||||
ret = rte_bbdev_enc_op_alloc_bulk(tp->op_params->mp_enc, ops_enq, num_segments);
|
||||
AssertFatal(ret == 0, "Allocation failed for %d ops", num_segments);
|
||||
|
||||
set_ldpc_enc_op(ops_enq, 0, bufs->inputs, bufs->hard_outputs, nrLDPC_slot_encoding_parameters);
|
||||
int ret = rte_bbdev_enc_op_alloc_bulk(tp->bbdev_op_pool, ops_enq, num_segments);
|
||||
AssertFatal(ret == 0, "Allocation failed for %d ops", num_segments);
|
||||
set_ldpc_enc_op(ops_enq, bufs->inputs, bufs->hard_outputs, nrLDPC_slot_encoding_parameters);
|
||||
|
||||
if (nrLDPC_slot_encoding_parameters->tprep != NULL)
|
||||
stop_meas(nrLDPC_slot_encoding_parameters->tprep);
|
||||
if (nrLDPC_slot_encoding_parameters->tparity != NULL)
|
||||
start_meas(nrLDPC_slot_encoding_parameters->tparity);
|
||||
for (enq = 0, deq = 0; enq < num_segments;) {
|
||||
num_to_enq = num_segments;
|
||||
if (unlikely(num_segments - enq < num_to_enq))
|
||||
num_to_enq = num_segments - enq;
|
||||
|
||||
uint16_t enq = 0, deq = 0;
|
||||
while (enq < num_segments) {
|
||||
uint16_t num_to_enq = num_segments - enq;
|
||||
enq += rte_bbdev_enqueue_ldpc_enc_ops(tp->dev_id, queue_id, &ops_enq[enq], num_to_enq);
|
||||
deq += rte_bbdev_dequeue_ldpc_enc_ops(tp->dev_id, queue_id, &ops_deq[deq], enq - deq);
|
||||
}
|
||||
@@ -864,21 +734,18 @@ static int pmd_lcore_ldpc_enc(void *arg)
|
||||
if (nrLDPC_slot_encoding_parameters->toutput != NULL)
|
||||
stop_meas(nrLDPC_slot_encoding_parameters->toutput);
|
||||
rte_bbdev_enc_op_free_bulk(ops_enq, num_segments);
|
||||
rte_free(ops_enq);
|
||||
rte_free(ops_deq);
|
||||
return ret;
|
||||
}
|
||||
|
||||
// based on DPDK BBDEV throughput_pmd_lcore_dec
|
||||
int start_pmd_dec(struct active_device *ad,
|
||||
struct test_op_params *op_params,
|
||||
struct data_buffers *data_buffers,
|
||||
nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters)
|
||||
{
|
||||
int ret;
|
||||
unsigned int lcore_id, used_cores = 0;
|
||||
uint16_t num_lcores;
|
||||
/* Set number of lcores */
|
||||
num_lcores = (ad->nb_queues < (op_params->num_lcores)) ? ad->nb_queues : op_params->num_lcores;
|
||||
int num_lcores = (ad->nb_queues < (op_params->num_lcores)) ? ad->nb_queues : op_params->num_lcores;
|
||||
/* Allocate memory for thread parameters structure */
|
||||
struct thread_params *t_params = rte_zmalloc(NULL, num_lcores * sizeof(struct thread_params), RTE_CACHE_LINE_SIZE);
|
||||
AssertFatal(t_params != 0,
|
||||
@@ -889,6 +756,8 @@ int start_pmd_dec(struct active_device *ad,
|
||||
t_params[0].dev_id = ad->dev_id;
|
||||
t_params[0].lcore_id = rte_lcore_id();
|
||||
t_params[0].op_params = op_params;
|
||||
t_params[0].data_buffers = data_buffers;
|
||||
t_params[0].bbdev_op_pool = ad->bbdev_dec_op_pool;
|
||||
t_params[0].queue_id = ad->dec_queue;
|
||||
t_params[0].iter_count = 0;
|
||||
t_params[0].nrLDPC_slot_decoding_parameters = nrLDPC_slot_decoding_parameters;
|
||||
@@ -900,13 +769,15 @@ int start_pmd_dec(struct active_device *ad,
|
||||
t_params[used_cores].dev_id = ad->dev_id;
|
||||
t_params[used_cores].lcore_id = lcore_id;
|
||||
t_params[used_cores].op_params = op_params;
|
||||
t_params[used_cores].data_buffers = data_buffers;
|
||||
t_params[used_cores].bbdev_op_pool = ad->bbdev_dec_op_pool;
|
||||
t_params[used_cores].queue_id = ad->queue_ids[used_cores];
|
||||
t_params[used_cores].iter_count = 0;
|
||||
t_params[used_cores].nrLDPC_slot_decoding_parameters = nrLDPC_slot_decoding_parameters;
|
||||
rte_eal_remote_launch(pmd_lcore_ldpc_dec, &t_params[used_cores++], lcore_id);
|
||||
}
|
||||
rte_atomic16_set(&op_params->sync, SYNC_START);
|
||||
ret = pmd_lcore_ldpc_dec(&t_params[0]);
|
||||
int ret = pmd_lcore_ldpc_dec(&t_params[0]);
|
||||
/* Master core is always used */
|
||||
// for (used_cores = 1; used_cores < num_lcores; used_cores++)
|
||||
// ret |= rte_eal_wait_lcore(t_params[used_cores].lcore_id);
|
||||
@@ -917,6 +788,7 @@ int start_pmd_dec(struct active_device *ad,
|
||||
// based on DPDK BBDEV throughput_pmd_lcore_enc
|
||||
int32_t start_pmd_enc(struct active_device *ad,
|
||||
struct test_op_params *op_params,
|
||||
struct data_buffers *data_buffers,
|
||||
nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_encoding_parameters)
|
||||
{
|
||||
unsigned int lcore_id, used_cores = 0;
|
||||
@@ -928,6 +800,8 @@ int32_t start_pmd_enc(struct active_device *ad,
|
||||
t_params[0].dev_id = ad->dev_id;
|
||||
t_params[0].lcore_id = rte_lcore_id() + 1;
|
||||
t_params[0].op_params = op_params;
|
||||
t_params[0].data_buffers = data_buffers;
|
||||
t_params[0].bbdev_op_pool = ad->bbdev_enc_op_pool;
|
||||
t_params[0].queue_id = ad->enc_queue;
|
||||
t_params[0].iter_count = 0;
|
||||
t_params[0].nrLDPC_slot_encoding_parameters = nrLDPC_slot_encoding_parameters;
|
||||
@@ -939,6 +813,8 @@ int32_t start_pmd_enc(struct active_device *ad,
|
||||
t_params[used_cores].dev_id = ad->dev_id;
|
||||
t_params[used_cores].lcore_id = lcore_id;
|
||||
t_params[used_cores].op_params = op_params;
|
||||
t_params[used_cores].data_buffers = data_buffers;
|
||||
t_params[used_cores].bbdev_op_pool = ad->bbdev_enc_op_pool;
|
||||
t_params[used_cores].queue_id = ad->queue_ids[1];
|
||||
t_params[used_cores].iter_count = 0;
|
||||
t_params[used_cores].nrLDPC_slot_encoding_parameters = nrLDPC_slot_encoding_parameters;
|
||||
@@ -952,8 +828,6 @@ int32_t start_pmd_enc(struct active_device *ad,
|
||||
|
||||
struct test_op_params *op_params = NULL;
|
||||
|
||||
struct rte_mbuf *m_head[DATA_NUM_TYPES];
|
||||
|
||||
// OAI CODE
|
||||
int32_t nrLDPC_coding_init()
|
||||
{
|
||||
@@ -1008,12 +882,7 @@ int32_t nrLDPC_coding_init()
|
||||
printf("Couldn't create mempools");
|
||||
return -1;
|
||||
}
|
||||
f_ret = init_test_op_params(op_params, RTE_BBDEV_OP_LDPC_DEC, ad->bbdev_dec_op_pool, num_queues, num_queues, 1);
|
||||
f_ret = init_test_op_params(op_params, RTE_BBDEV_OP_LDPC_ENC, ad->bbdev_enc_op_pool, num_queues, num_queues, 1);
|
||||
if (f_ret != 0) {
|
||||
printf("Couldn't init test op params");
|
||||
return -1;
|
||||
}
|
||||
op_params->num_lcores = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1022,7 +891,7 @@ int32_t nrLDPC_coding_shutdown()
|
||||
struct active_device *ad = active_devs;
|
||||
int dev_id = 0;
|
||||
struct rte_bbdev_stats stats;
|
||||
free_buffers(ad, op_params);
|
||||
free_mempools(ad);
|
||||
rte_free(op_params);
|
||||
rte_bbdev_stats_get(dev_id, &stats);
|
||||
rte_bbdev_stop(dev_id);
|
||||
@@ -1032,20 +901,17 @@ int32_t nrLDPC_coding_shutdown()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t nrLDPC_coding_decoder(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters){
|
||||
|
||||
int32_t nrLDPC_coding_decoder(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_decoding_parameters)
|
||||
{
|
||||
pthread_mutex_lock(&decode_mutex);
|
||||
|
||||
uint16_t num_blocks = 0;
|
||||
for(uint16_t h = 0; h < nrLDPC_slot_decoding_parameters->nb_TBs; ++h){
|
||||
num_blocks += nrLDPC_slot_decoding_parameters->TBs[h].C;
|
||||
}
|
||||
uint16_t z_ol[LDPC_MAX_CB_SIZE] __attribute__((aligned(16)));
|
||||
const uint16_t num_segments = nb_segments_decoding(nrLDPC_slot_decoding_parameters);
|
||||
|
||||
/* It is not unlikely that l_ol becomes big enough to overflow the stack
|
||||
* If you observe this behavior then move it to the heap
|
||||
* Then you would better do a persistent allocation to limit the overhead
|
||||
*/
|
||||
uint8_t l_ol[num_blocks * LDPC_MAX_CB_SIZE] __attribute__((aligned(16)));
|
||||
uint8_t l_ol[num_segments * LDPC_MAX_CB_SIZE] __attribute__((aligned(16)));
|
||||
|
||||
// hardcoded we use first device
|
||||
struct active_device *ad = active_devs;
|
||||
@@ -1054,35 +920,26 @@ int32_t nrLDPC_coding_decoder(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_dec
|
||||
rte_bbdev_info_get(ad->dev_id, &info);
|
||||
int socket_id = GET_SOCKET(info.socket_id);
|
||||
// fill_queue_buffers -> init_op_data_objs
|
||||
struct rte_mempool *in_mp = ad->in_mbuf_pool;
|
||||
struct rte_mempool *hard_out_mp = ad->hard_out_mbuf_pool;
|
||||
struct rte_mempool *soft_out_mp = ad->soft_out_mbuf_pool;
|
||||
struct rte_mempool *harq_in_mp = ad->harq_in_mbuf_pool;
|
||||
struct rte_mempool *harq_out_mp = ad->harq_out_mbuf_pool;
|
||||
struct rte_mempool *mbuf_pools[DATA_NUM_TYPES] = {in_mp, soft_out_mp, hard_out_mp, harq_in_mp, harq_out_mp};
|
||||
uint8_t queue_id = ad->dec_queue;
|
||||
struct rte_bbdev_op_data **queue_ops[DATA_NUM_TYPES] = {&op_params->q_bufs[socket_id][queue_id].inputs,
|
||||
&op_params->q_bufs[socket_id][queue_id].soft_outputs,
|
||||
&op_params->q_bufs[socket_id][queue_id].hard_outputs,
|
||||
&op_params->q_bufs[socket_id][queue_id].harq_inputs,
|
||||
&op_params->q_bufs[socket_id][queue_id].harq_outputs};
|
||||
struct rte_mempool *mbuf_pools[DATA_NUM_TYPES] = {ad->in_mbuf_pool, ad->hard_out_mbuf_pool};
|
||||
struct data_buffers data_buffers;
|
||||
struct rte_bbdev_op_data **queue_ops[DATA_NUM_TYPES] = {&data_buffers.inputs, &data_buffers.hard_outputs};
|
||||
|
||||
int offset = 0;
|
||||
for(uint16_t h = 0; h < nrLDPC_slot_decoding_parameters->nb_TBs; ++h){
|
||||
for (int h = 0; h < nrLDPC_slot_decoding_parameters->nb_TBs; ++h) {
|
||||
for (int r = 0; r < nrLDPC_slot_decoding_parameters->TBs[h].C; r++) {
|
||||
uint16_t z_ol[LDPC_MAX_CB_SIZE] __attribute__((aligned(16)));
|
||||
memcpy(z_ol, nrLDPC_slot_decoding_parameters->TBs[h].segments[r].llr, nrLDPC_slot_decoding_parameters->TBs[h].segments[r].E * sizeof(uint16_t));
|
||||
simde__m128i *pv_ol128 = (simde__m128i *)z_ol;
|
||||
simde__m128i *pl_ol128 = (simde__m128i *)&l_ol[offset];
|
||||
int kc = nrLDPC_slot_decoding_parameters->TBs[h].BG == 2 ? 52 : 68;
|
||||
for (int i = 0, j = 0; j < ((kc * nrLDPC_slot_decoding_parameters->TBs[h].Z) >> 4) + 1; i += 2, j++) {
|
||||
for (int i = 0, j = 0; j < ((nrLDPC_slot_decoding_parameters->TBs[h].segments[r].E + 15) >> 4); i += 2, j++) {
|
||||
pl_ol128[j] = simde_mm_packs_epi16(pv_ol128[i], pv_ol128[i + 1]);
|
||||
}
|
||||
offset += LDPC_MAX_CB_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
for (enum op_data_type type = DATA_INPUT; type < 3; type += 2) {
|
||||
ret = allocate_buffers_on_socket(queue_ops[type], num_blocks * sizeof(struct rte_bbdev_op_data), socket_id);
|
||||
for (enum op_data_type type = DATA_INPUT; type < DATA_NUM_TYPES; ++type) {
|
||||
ret = allocate_buffers_on_socket(queue_ops[type], num_segments * sizeof(struct rte_bbdev_op_data), socket_id);
|
||||
AssertFatal(ret == 0, "Couldn't allocate memory for rte_bbdev_op_data structs");
|
||||
ret = init_op_data_objs_dec(*queue_ops[type],
|
||||
l_ol,
|
||||
@@ -1093,11 +950,17 @@ int32_t nrLDPC_coding_decoder(nrLDPC_slot_decoding_parameters_t *nrLDPC_slot_dec
|
||||
AssertFatal(ret == 0, "Couldn't init rte_bbdev_op_data structs");
|
||||
}
|
||||
|
||||
ret = start_pmd_dec(ad, op_params, nrLDPC_slot_decoding_parameters);
|
||||
ret = start_pmd_dec(ad, op_params, &data_buffers, nrLDPC_slot_decoding_parameters);
|
||||
if (ret < 0) {
|
||||
LOG_E(PHY, "Couldn't start pmd dec\n");
|
||||
}
|
||||
|
||||
for (enum op_data_type type = DATA_INPUT; type < DATA_NUM_TYPES; ++type) {
|
||||
for (int segment = 0; segment < num_segments; ++segment)
|
||||
rte_pktmbuf_free((*queue_ops[type])[segment].data);
|
||||
rte_free(*queue_ops[type]);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&decode_mutex);
|
||||
return 0;
|
||||
}
|
||||
@@ -1107,6 +970,9 @@ int32_t nrLDPC_coding_encoder(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_enc
|
||||
pthread_mutex_lock(&encode_mutex);
|
||||
if (nrLDPC_slot_encoding_parameters->tprep != NULL)
|
||||
start_meas(nrLDPC_slot_encoding_parameters->tprep);
|
||||
|
||||
const uint16_t num_segments = nb_segments_encoding(nrLDPC_slot_encoding_parameters);
|
||||
|
||||
// hardcoded to use the first found board
|
||||
struct active_device *ad = active_devs;
|
||||
int ret;
|
||||
@@ -1114,34 +980,25 @@ int32_t nrLDPC_coding_encoder(nrLDPC_slot_encoding_parameters_t *nrLDPC_slot_enc
|
||||
rte_bbdev_info_get(ad->dev_id, &info);
|
||||
int socket_id = GET_SOCKET(info.socket_id);
|
||||
// fill_queue_buffers -> init_op_data_objs
|
||||
struct rte_mempool *in_mp = ad->in_mbuf_pool;
|
||||
struct rte_mempool *hard_out_mp = ad->hard_out_mbuf_pool;
|
||||
struct rte_mempool *soft_out_mp = ad->soft_out_mbuf_pool;
|
||||
struct rte_mempool *harq_in_mp = ad->harq_in_mbuf_pool;
|
||||
struct rte_mempool *harq_out_mp = ad->harq_out_mbuf_pool;
|
||||
struct rte_mempool *mbuf_pools[DATA_NUM_TYPES] = {in_mp, soft_out_mp, hard_out_mp, harq_in_mp, harq_out_mp};
|
||||
uint8_t queue_id = ad->enc_queue;
|
||||
struct rte_bbdev_op_data **queue_ops[DATA_NUM_TYPES] = {&op_params->q_bufs[socket_id][queue_id].inputs,
|
||||
&op_params->q_bufs[socket_id][queue_id].soft_outputs,
|
||||
&op_params->q_bufs[socket_id][queue_id].hard_outputs,
|
||||
&op_params->q_bufs[socket_id][queue_id].harq_inputs,
|
||||
&op_params->q_bufs[socket_id][queue_id].harq_outputs};
|
||||
uint16_t num_blocks = 0;
|
||||
for(uint16_t h = 0; h < nrLDPC_slot_encoding_parameters->nb_TBs; ++h){
|
||||
num_blocks += nrLDPC_slot_encoding_parameters->TBs[h].C;
|
||||
}
|
||||
for (enum op_data_type type = DATA_INPUT; type < 3; type += 2) {
|
||||
ret = allocate_buffers_on_socket(queue_ops[type], num_blocks * sizeof(struct rte_bbdev_op_data), socket_id);
|
||||
struct rte_mempool *mbuf_pools[DATA_NUM_TYPES] = {ad->in_mbuf_pool, ad->hard_out_mbuf_pool};
|
||||
struct data_buffers data_buffers;
|
||||
struct rte_bbdev_op_data **queue_ops[DATA_NUM_TYPES] = {&data_buffers.inputs, &data_buffers.hard_outputs};
|
||||
|
||||
for (enum op_data_type type = DATA_INPUT; type < DATA_NUM_TYPES; ++type) {
|
||||
ret = allocate_buffers_on_socket(queue_ops[type], num_segments * sizeof(struct rte_bbdev_op_data), socket_id);
|
||||
AssertFatal(ret == 0, "Couldn't allocate memory for rte_bbdev_op_data structs");
|
||||
ret = init_op_data_objs_enc(*queue_ops[type],
|
||||
nrLDPC_slot_encoding_parameters,
|
||||
m_head[type],
|
||||
mbuf_pools[type],
|
||||
type,
|
||||
info.drv.min_alignment);
|
||||
ret = init_op_data_objs_enc(*queue_ops[type], nrLDPC_slot_encoding_parameters, mbuf_pools[type], type, info.drv.min_alignment);
|
||||
AssertFatal(ret == 0, "Couldn't init rte_bbdev_op_data structs");
|
||||
}
|
||||
ret = start_pmd_enc(ad, op_params, nrLDPC_slot_encoding_parameters);
|
||||
|
||||
ret = start_pmd_enc(ad, op_params, &data_buffers, nrLDPC_slot_encoding_parameters);
|
||||
|
||||
for (enum op_data_type type = DATA_INPUT; type < DATA_NUM_TYPES; ++type) {
|
||||
for (int segment = 0; segment < num_segments; ++segment)
|
||||
rte_pktmbuf_free((*queue_ops[type])[segment].data);
|
||||
rte_free(*queue_ops[type]);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&encode_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -16,10 +16,7 @@
|
||||
|
||||
enum op_data_type {
|
||||
DATA_INPUT = 0,
|
||||
DATA_SOFT_OUTPUT,
|
||||
DATA_HARD_OUTPUT,
|
||||
DATA_HARQ_INPUT,
|
||||
DATA_HARQ_OUTPUT,
|
||||
DATA_NUM_TYPES,
|
||||
};
|
||||
|
||||
|
||||
391
openair1/PHY/CODING/nrLDPC_decoder/CMakeCache.txt
Normal file
391
openair1/PHY/CODING/nrLDPC_decoder/CMakeCache.txt
Normal file
@@ -0,0 +1,391 @@
|
||||
# This is the CMakeCache file.
|
||||
# For build in directory: /home/compmeth/panq/OAI/openairinterface5g/openair1/PHY/CODING/nrLDPC_decoder
|
||||
# It was generated by CMake: /usr/bin/cmake
|
||||
# You can edit this file to change values found and used by cmake.
|
||||
# If you do not want to change any of the values, simply exit the editor.
|
||||
# If you do want to change a value, simply edit, save, and exit the editor.
|
||||
# The syntax for the file is as follows:
|
||||
# KEY:TYPE=VALUE
|
||||
# KEY is the name of a variable in the cache.
|
||||
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
|
||||
# VALUE is the current value for the KEY.
|
||||
|
||||
########################
|
||||
# EXTERNAL cache entries
|
||||
########################
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_AR:FILEPATH=/usr/bin/ar
|
||||
|
||||
//For backwards compatibility, what version of CMake commands and
|
||||
// syntax should this version of CMake try to support.
|
||||
CMAKE_BACKWARDS_COMPATIBILITY:STRING=2.4
|
||||
|
||||
//Choose the type of build, options are: None Debug Release RelWithDebInfo
|
||||
// MinSizeRel ...
|
||||
CMAKE_BUILD_TYPE:STRING=
|
||||
|
||||
//Enable/Disable color output during build.
|
||||
CMAKE_COLOR_MAKEFILE:BOOL=ON
|
||||
|
||||
//CXX compiler
|
||||
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
|
||||
|
||||
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-11
|
||||
|
||||
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-11
|
||||
|
||||
//Flags used by the CXX compiler during all build types.
|
||||
CMAKE_CXX_FLAGS:STRING=
|
||||
|
||||
//Flags used by the CXX compiler during DEBUG builds.
|
||||
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
|
||||
|
||||
//Flags used by the CXX compiler during MINSIZEREL builds.
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
|
||||
|
||||
//Flags used by the CXX compiler during RELEASE builds.
|
||||
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
|
||||
|
||||
//Flags used by the CXX compiler during RELWITHDEBINFO builds.
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
|
||||
|
||||
//C compiler
|
||||
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
|
||||
|
||||
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-11
|
||||
|
||||
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-11
|
||||
|
||||
//Flags used by the C compiler during all build types.
|
||||
CMAKE_C_FLAGS:STRING=
|
||||
|
||||
//Flags used by the C compiler during DEBUG builds.
|
||||
CMAKE_C_FLAGS_DEBUG:STRING=-g
|
||||
|
||||
//Flags used by the C compiler during MINSIZEREL builds.
|
||||
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
|
||||
|
||||
//Flags used by the C compiler during RELEASE builds.
|
||||
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
|
||||
|
||||
//Flags used by the C compiler during RELWITHDEBINFO builds.
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
|
||||
|
||||
//Flags used by the linker during all build types.
|
||||
CMAKE_EXE_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during DEBUG builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during MINSIZEREL builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during RELEASE builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during RELWITHDEBINFO builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Enable/Disable output of compile commands during generation.
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=
|
||||
|
||||
//Install path prefix, prepended onto install directories.
|
||||
CMAKE_INSTALL_PREFIX:PATH=/usr/local
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_LINKER:FILEPATH=/usr/bin/ld
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// all build types.
|
||||
CMAKE_MODULE_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// DEBUG builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// MINSIZEREL builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// RELEASE builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// RELWITHDEBINFO builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_NM:FILEPATH=/usr/bin/nm
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_DESCRIPTION:STATIC=
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_NAME:STATIC=Project
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_READELF:FILEPATH=/usr/bin/readelf
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during all build types.
|
||||
CMAKE_SHARED_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during DEBUG builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during MINSIZEREL builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during RELEASE builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during RELWITHDEBINFO builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//If set, runtime paths are not added when installing shared libraries,
|
||||
// but are added when building.
|
||||
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
|
||||
|
||||
//If set, runtime paths are not added when using shared libraries.
|
||||
CMAKE_SKIP_RPATH:BOOL=NO
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during all build types.
|
||||
CMAKE_STATIC_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during DEBUG builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during MINSIZEREL builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during RELEASE builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during RELWITHDEBINFO builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_STRIP:FILEPATH=/usr/bin/strip
|
||||
|
||||
//If this value is on, makefiles will be generated without the
|
||||
// .SILENT directive, and all commands will be echoed to the console
|
||||
// during the make. This is useful for debugging only. With Visual
|
||||
// Studio IDE projects all commands are done without /nologo.
|
||||
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
|
||||
|
||||
//Single output directory for building all executables.
|
||||
EXECUTABLE_OUTPUT_PATH:PATH=
|
||||
|
||||
//Single output directory for building all libraries.
|
||||
LIBRARY_OUTPUT_PATH:PATH=
|
||||
|
||||
//Value Computed by CMake
|
||||
Project_BINARY_DIR:STATIC=/home/compmeth/panq/OAI/openairinterface5g/openair1/PHY/CODING/nrLDPC_decoder
|
||||
|
||||
//Value Computed by CMake
|
||||
Project_IS_TOP_LEVEL:STATIC=ON
|
||||
|
||||
//Value Computed by CMake
|
||||
Project_SOURCE_DIR:STATIC=/home/compmeth/panq/OAI/openairinterface5g/openair1/PHY/CODING
|
||||
|
||||
//Dependencies for the target
|
||||
coding_LIB_DEPENDS:STATIC=general;log_headers;
|
||||
|
||||
//Dependencies for the target
|
||||
ldpc_LIB_DEPENDS:STATIC=general;ldpc_segment;general;ldpc_gen_HEADERS;
|
||||
|
||||
//Dependencies for the target
|
||||
ldpc_cl_LIB_DEPENDS:STATIC=general;ldpc_segment;general;OpenCL;
|
||||
|
||||
//Dependencies for the target
|
||||
ldpc_orig_LIB_DEPENDS:STATIC=general;ldpc_segment;general;ldpc_gen_HEADERS;
|
||||
|
||||
|
||||
########################
|
||||
# INTERNAL cache entries
|
||||
########################
|
||||
|
||||
//ADVANCED property for variable: CMAKE_ADDR2LINE
|
||||
CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_AR
|
||||
CMAKE_AR-ADVANCED:INTERNAL=1
|
||||
//This is the directory where this CMakeCache.txt was created
|
||||
CMAKE_CACHEFILE_DIR:INTERNAL=/home/compmeth/panq/OAI/openairinterface5g/openair1/PHY/CODING/nrLDPC_decoder
|
||||
//Major version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
|
||||
//Minor version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MINOR_VERSION:INTERNAL=22
|
||||
//Patch version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_PATCH_VERSION:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
|
||||
CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
|
||||
//Path to CMake executable.
|
||||
CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
|
||||
//Path to cpack program executable.
|
||||
CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
|
||||
//Path to ctest program executable.
|
||||
CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER
|
||||
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
|
||||
CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
|
||||
CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS
|
||||
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER
|
||||
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER_AR
|
||||
CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
|
||||
CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS
|
||||
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
|
||||
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
|
||||
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_DLLTOOL
|
||||
CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
|
||||
//Executable file format
|
||||
CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
|
||||
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
|
||||
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
|
||||
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
|
||||
//Name of external makefile project generator.
|
||||
CMAKE_EXTRA_GENERATOR:INTERNAL=
|
||||
//Name of generator.
|
||||
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
|
||||
//Generator instance identifier.
|
||||
CMAKE_GENERATOR_INSTANCE:INTERNAL=
|
||||
//Name of generator platform.
|
||||
CMAKE_GENERATOR_PLATFORM:INTERNAL=
|
||||
//Name of generator toolset.
|
||||
CMAKE_GENERATOR_TOOLSET:INTERNAL=
|
||||
//Source directory with the top level CMakeLists.txt file for this
|
||||
// project
|
||||
CMAKE_HOME_DIRECTORY:INTERNAL=/home/compmeth/panq/OAI/openairinterface5g/openair1/PHY/CODING
|
||||
//Install .so files without execute permission.
|
||||
CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_LINKER
|
||||
CMAKE_LINKER-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
|
||||
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
|
||||
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
|
||||
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_NM
|
||||
CMAKE_NM-ADVANCED:INTERNAL=1
|
||||
//number of local generators
|
||||
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_OBJCOPY
|
||||
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_OBJDUMP
|
||||
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
|
||||
//Platform information initialized
|
||||
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_RANLIB
|
||||
CMAKE_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_READELF
|
||||
CMAKE_READELF-ADVANCED:INTERNAL=1
|
||||
//Path to CMake installation.
|
||||
CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.22
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
|
||||
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
|
||||
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
|
||||
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SKIP_RPATH
|
||||
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
|
||||
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
|
||||
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STRIP
|
||||
CMAKE_STRIP-ADVANCED:INTERNAL=1
|
||||
//uname command
|
||||
CMAKE_UNAME:INTERNAL=/usr/bin/uname
|
||||
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
|
||||
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
set(CMAKE_C_COMPILER "/usr/bin/cc")
|
||||
set(CMAKE_C_COMPILER_ARG1 "")
|
||||
set(CMAKE_C_COMPILER_ID "GNU")
|
||||
set(CMAKE_C_COMPILER_VERSION "11.4.0")
|
||||
set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
|
||||
set(CMAKE_C_COMPILER_WRAPPER "")
|
||||
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "17")
|
||||
set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON")
|
||||
set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17;c_std_23")
|
||||
set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
|
||||
set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
|
||||
set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
|
||||
set(CMAKE_C17_COMPILE_FEATURES "c_std_17")
|
||||
set(CMAKE_C23_COMPILE_FEATURES "c_std_23")
|
||||
|
||||
set(CMAKE_C_PLATFORM_ID "Linux")
|
||||
set(CMAKE_C_SIMULATE_ID "")
|
||||
set(CMAKE_C_COMPILER_FRONTEND_VARIANT "")
|
||||
set(CMAKE_C_SIMULATE_VERSION "")
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_AR "/usr/bin/ar")
|
||||
set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-11")
|
||||
set(CMAKE_RANLIB "/usr/bin/ranlib")
|
||||
set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-11")
|
||||
set(CMAKE_LINKER "/usr/bin/ld")
|
||||
set(CMAKE_MT "")
|
||||
set(CMAKE_COMPILER_IS_GNUCC 1)
|
||||
set(CMAKE_C_COMPILER_LOADED 1)
|
||||
set(CMAKE_C_COMPILER_WORKS TRUE)
|
||||
set(CMAKE_C_ABI_COMPILED TRUE)
|
||||
|
||||
set(CMAKE_C_COMPILER_ENV_VAR "CC")
|
||||
|
||||
set(CMAKE_C_COMPILER_ID_RUN 1)
|
||||
set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
|
||||
set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
||||
set(CMAKE_C_LINKER_PREFERENCE 10)
|
||||
|
||||
# Save compiler ABI information.
|
||||
set(CMAKE_C_SIZEOF_DATA_PTR "8")
|
||||
set(CMAKE_C_COMPILER_ABI "ELF")
|
||||
set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN")
|
||||
set(CMAKE_C_LIBRARY_ARCHITECTURE "aarch64-linux-gnu")
|
||||
|
||||
if(CMAKE_C_SIZEOF_DATA_PTR)
|
||||
set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ABI)
|
||||
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_LIBRARY_ARCHITECTURE)
|
||||
set(CMAKE_LIBRARY_ARCHITECTURE "aarch64-linux-gnu")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
|
||||
if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
|
||||
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/usr/lib/gcc/aarch64-linux-gnu/11/include;/usr/local/include;/usr/include/aarch64-linux-gnu;/usr/include")
|
||||
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s")
|
||||
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/aarch64-linux-gnu/11;/usr/lib/aarch64-linux-gnu;/usr/lib;/lib/aarch64-linux-gnu;/lib")
|
||||
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
|
||||
@@ -0,0 +1,83 @@
|
||||
set(CMAKE_CXX_COMPILER "/usr/bin/c++")
|
||||
set(CMAKE_CXX_COMPILER_ARG1 "")
|
||||
set(CMAKE_CXX_COMPILER_ID "GNU")
|
||||
set(CMAKE_CXX_COMPILER_VERSION "11.4.0")
|
||||
set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
|
||||
set(CMAKE_CXX_COMPILER_WRAPPER "")
|
||||
set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "17")
|
||||
set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "ON")
|
||||
set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23")
|
||||
set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
|
||||
set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
|
||||
set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
|
||||
set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
|
||||
set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20")
|
||||
set(CMAKE_CXX23_COMPILE_FEATURES "cxx_std_23")
|
||||
|
||||
set(CMAKE_CXX_PLATFORM_ID "Linux")
|
||||
set(CMAKE_CXX_SIMULATE_ID "")
|
||||
set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "")
|
||||
set(CMAKE_CXX_SIMULATE_VERSION "")
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_AR "/usr/bin/ar")
|
||||
set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-11")
|
||||
set(CMAKE_RANLIB "/usr/bin/ranlib")
|
||||
set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-11")
|
||||
set(CMAKE_LINKER "/usr/bin/ld")
|
||||
set(CMAKE_MT "")
|
||||
set(CMAKE_COMPILER_IS_GNUCXX 1)
|
||||
set(CMAKE_CXX_COMPILER_LOADED 1)
|
||||
set(CMAKE_CXX_COMPILER_WORKS TRUE)
|
||||
set(CMAKE_CXX_ABI_COMPILED TRUE)
|
||||
|
||||
set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
|
||||
|
||||
set(CMAKE_CXX_COMPILER_ID_RUN 1)
|
||||
set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm)
|
||||
set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
||||
|
||||
foreach (lang C OBJC OBJCXX)
|
||||
if (CMAKE_${lang}_COMPILER_ID_RUN)
|
||||
foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS)
|
||||
list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension})
|
||||
endforeach()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(CMAKE_CXX_LINKER_PREFERENCE 30)
|
||||
set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
|
||||
|
||||
# Save compiler ABI information.
|
||||
set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
|
||||
set(CMAKE_CXX_COMPILER_ABI "ELF")
|
||||
set(CMAKE_CXX_BYTE_ORDER "LITTLE_ENDIAN")
|
||||
set(CMAKE_CXX_LIBRARY_ARCHITECTURE "aarch64-linux-gnu")
|
||||
|
||||
if(CMAKE_CXX_SIZEOF_DATA_PTR)
|
||||
set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ABI)
|
||||
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
|
||||
set(CMAKE_LIBRARY_ARCHITECTURE "aarch64-linux-gnu")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
|
||||
if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
|
||||
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include/c++/11;/usr/include/aarch64-linux-gnu/c++/11;/usr/include/c++/11/backward;/usr/lib/gcc/aarch64-linux-gnu/11/include;/usr/local/include;/usr/include/aarch64-linux-gnu;/usr/include")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/aarch64-linux-gnu/11;/usr/lib/aarch64-linux-gnu;/usr/lib;/lib/aarch64-linux-gnu;/lib")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
set(CMAKE_HOST_SYSTEM "Linux-6.5.0-1019-nvidia-64k")
|
||||
set(CMAKE_HOST_SYSTEM_NAME "Linux")
|
||||
set(CMAKE_HOST_SYSTEM_VERSION "6.5.0-1019-nvidia-64k")
|
||||
set(CMAKE_HOST_SYSTEM_PROCESSOR "aarch64")
|
||||
|
||||
|
||||
|
||||
set(CMAKE_SYSTEM "Linux-6.5.0-1019-nvidia-64k")
|
||||
set(CMAKE_SYSTEM_NAME "Linux")
|
||||
set(CMAKE_SYSTEM_VERSION "6.5.0-1019-nvidia-64k")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "aarch64")
|
||||
|
||||
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||
|
||||
set(CMAKE_SYSTEM_LOADED 1)
|
||||
@@ -0,0 +1,803 @@
|
||||
#ifdef __cplusplus
|
||||
# error "A C++ compiler has been selected for C."
|
||||
#endif
|
||||
|
||||
#if defined(__18CXX)
|
||||
# define ID_VOID_MAIN
|
||||
#endif
|
||||
#if defined(__CLASSIC_C__)
|
||||
/* cv-qualifiers did not exist in K&R C */
|
||||
# define const
|
||||
# define volatile
|
||||
#endif
|
||||
|
||||
#if !defined(__has_include)
|
||||
/* If the compiler does not have __has_include, pretend the answer is
|
||||
always no. */
|
||||
# define __has_include(x) 0
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number components: V=Version, R=Revision, P=Patch
|
||||
Version date components: YYYY=Year, MM=Month, DD=Day */
|
||||
|
||||
#if defined(__INTEL_COMPILER) || defined(__ICC)
|
||||
# define COMPILER_ID "Intel"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# if defined(__GNUC__)
|
||||
# define SIMULATE_ID "GNU"
|
||||
# endif
|
||||
/* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
|
||||
except that a few beta releases use the old format with V=2021. */
|
||||
# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
|
||||
# if defined(__INTEL_COMPILER_UPDATE)
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
|
||||
# else
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
|
||||
# endif
|
||||
# else
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
|
||||
/* The third version component from --version is an update index,
|
||||
but no macro is provided for it. */
|
||||
# define COMPILER_VERSION_PATCH DEC(0)
|
||||
# endif
|
||||
# if defined(__INTEL_COMPILER_BUILD_DATE)
|
||||
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
|
||||
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
|
||||
# endif
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
# if defined(__GNUC__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
|
||||
# elif defined(__GNUG__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
|
||||
# endif
|
||||
# if defined(__GNUC_MINOR__)
|
||||
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
# endif
|
||||
# if defined(__GNUC_PATCHLEVEL__)
|
||||
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
|
||||
# define COMPILER_ID "IntelLLVM"
|
||||
#if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
#endif
|
||||
#if defined(__GNUC__)
|
||||
# define SIMULATE_ID "GNU"
|
||||
#endif
|
||||
/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
|
||||
* later. Look for 6 digit vs. 8 digit version number to decide encoding.
|
||||
* VVVV is no smaller than the current year when a version is released.
|
||||
*/
|
||||
#if __INTEL_LLVM_COMPILER < 1000000L
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10)
|
||||
#else
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
|
||||
#endif
|
||||
#if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
#endif
|
||||
#if defined(__GNUC__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
|
||||
#elif defined(__GNUG__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
|
||||
#endif
|
||||
#if defined(__GNUC_MINOR__)
|
||||
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
#endif
|
||||
#if defined(__GNUC_PATCHLEVEL__)
|
||||
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
#endif
|
||||
|
||||
#elif defined(__PATHCC__)
|
||||
# define COMPILER_ID "PathScale"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
|
||||
# if defined(__PATHCC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
|
||||
# define COMPILER_ID "Embarcadero"
|
||||
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
|
||||
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
|
||||
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
# define COMPILER_ID "Borland"
|
||||
/* __BORLANDC__ = 0xVRR */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
|
||||
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
|
||||
|
||||
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
|
||||
# define COMPILER_ID "Watcom"
|
||||
/* __WATCOMC__ = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# define COMPILER_ID "OpenWatcom"
|
||||
/* __WATCOMC__ = VVRP + 1100 */
|
||||
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__SUNPRO_C)
|
||||
# define COMPILER_ID "SunPro"
|
||||
# if __SUNPRO_C >= 0x5100
|
||||
/* __SUNPRO_C = 0xVRRP */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
|
||||
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
|
||||
# else
|
||||
/* __SUNPRO_CC = 0xVRP */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
|
||||
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
|
||||
# endif
|
||||
|
||||
#elif defined(__HP_cc)
|
||||
# define COMPILER_ID "HP"
|
||||
/* __HP_cc = VVRRPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
|
||||
|
||||
#elif defined(__DECC)
|
||||
# define COMPILER_ID "Compaq"
|
||||
/* __DECC_VER = VVRRTPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000)
|
||||
|
||||
#elif defined(__IBMC__) && defined(__COMPILER_VER__)
|
||||
# define COMPILER_ID "zOS"
|
||||
/* __IBMC__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
|
||||
|
||||
#elif defined(__ibmxl__) && defined(__clang__)
|
||||
# define COMPILER_ID "XLClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
|
||||
# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
|
||||
|
||||
|
||||
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
|
||||
# define COMPILER_ID "XL"
|
||||
/* __IBMC__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
|
||||
|
||||
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
|
||||
# define COMPILER_ID "VisualAge"
|
||||
/* __IBMC__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
|
||||
|
||||
#elif defined(__NVCOMPILER)
|
||||
# define COMPILER_ID "NVHPC"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
|
||||
# if defined(__NVCOMPILER_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__PGI)
|
||||
# define COMPILER_ID "PGI"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
|
||||
# if defined(__PGIC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_CRAYC)
|
||||
# define COMPILER_ID "Cray"
|
||||
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
|
||||
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
|
||||
|
||||
#elif defined(__TI_COMPILER_VERSION__)
|
||||
# define COMPILER_ID "TI"
|
||||
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
|
||||
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
|
||||
|
||||
#elif defined(__CLANG_FUJITSU)
|
||||
# define COMPILER_ID "FujitsuClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
|
||||
# define COMPILER_VERSION_INTERNAL_STR __clang_version__
|
||||
|
||||
|
||||
#elif defined(__FUJITSU)
|
||||
# define COMPILER_ID "Fujitsu"
|
||||
# if defined(__FCC_version__)
|
||||
# define COMPILER_VERSION __FCC_version__
|
||||
# elif defined(__FCC_major__)
|
||||
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
|
||||
# endif
|
||||
# if defined(__fcc_version)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
|
||||
# elif defined(__FCC_VERSION)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
|
||||
# endif
|
||||
|
||||
|
||||
#elif defined(__ghs__)
|
||||
# define COMPILER_ID "GHS"
|
||||
/* __GHS_VERSION_NUMBER = VVVVRP */
|
||||
# ifdef __GHS_VERSION_NUMBER
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__TINYC__)
|
||||
# define COMPILER_ID "TinyCC"
|
||||
|
||||
#elif defined(__BCC__)
|
||||
# define COMPILER_ID "Bruce"
|
||||
|
||||
#elif defined(__SCO_VERSION__)
|
||||
# define COMPILER_ID "SCO"
|
||||
|
||||
#elif defined(__ARMCC_VERSION) && !defined(__clang__)
|
||||
# define COMPILER_ID "ARMCC"
|
||||
#if __ARMCC_VERSION >= 1000000
|
||||
/* __ARMCC_VERSION = VRRPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
||||
#else
|
||||
/* __ARMCC_VERSION = VRPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
||||
#endif
|
||||
|
||||
|
||||
#elif defined(__clang__) && defined(__apple_build_version__)
|
||||
# define COMPILER_ID "AppleClang"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
|
||||
|
||||
#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
|
||||
# define COMPILER_ID "ARMClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
|
||||
|
||||
#elif defined(__clang__)
|
||||
# define COMPILER_ID "Clang"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
# define COMPILER_ID "GNU"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
|
||||
# if defined(__GNUC_MINOR__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
# endif
|
||||
# if defined(__GNUC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
# define COMPILER_ID "MSVC"
|
||||
/* _MSC_VER = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# if defined(_MSC_FULL_VER)
|
||||
# if _MSC_VER >= 1400
|
||||
/* _MSC_FULL_VER = VVRRPPPPP */
|
||||
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
|
||||
# else
|
||||
/* _MSC_FULL_VER = VVRRPPPP */
|
||||
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
|
||||
# endif
|
||||
# endif
|
||||
# if defined(_MSC_BUILD)
|
||||
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
|
||||
# endif
|
||||
|
||||
#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
|
||||
# define COMPILER_ID "ADSP"
|
||||
#if defined(__VISUALDSPVERSION__)
|
||||
/* __VISUALDSPVERSION__ = 0xVVRRPP00 */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
|
||||
# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
|
||||
#endif
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
||||
# define COMPILER_ID "IAR"
|
||||
# if defined(__VER__) && defined(__ICCARM__)
|
||||
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
|
||||
# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
||||
# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
|
||||
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
|
||||
# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
||||
# endif
|
||||
|
||||
#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
|
||||
# define COMPILER_ID "SDCC"
|
||||
# if defined(__SDCC_VERSION_MAJOR)
|
||||
# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
|
||||
# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
|
||||
# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
|
||||
# else
|
||||
/* SDCC = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(SDCC/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(SDCC % 10)
|
||||
# endif
|
||||
|
||||
|
||||
/* These compilers are either not known or too old to define an
|
||||
identification macro. Try to identify the platform and guess that
|
||||
it is the native compiler. */
|
||||
#elif defined(__hpux) || defined(__hpua)
|
||||
# define COMPILER_ID "HP"
|
||||
|
||||
#else /* unknown compiler */
|
||||
# define COMPILER_ID ""
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
|
||||
#ifdef SIMULATE_ID
|
||||
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
||||
#endif
|
||||
|
||||
#ifdef __QNXNTO__
|
||||
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
||||
#endif
|
||||
|
||||
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
|
||||
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
#endif
|
||||
|
||||
#define STRINGIFY_HELPER(X) #X
|
||||
#define STRINGIFY(X) STRINGIFY_HELPER(X)
|
||||
|
||||
/* Identify known platforms by name. */
|
||||
#if defined(__linux) || defined(__linux__) || defined(linux)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
#elif defined(__MSYS__)
|
||||
# define PLATFORM_ID "MSYS"
|
||||
|
||||
#elif defined(__CYGWIN__)
|
||||
# define PLATFORM_ID "Cygwin"
|
||||
|
||||
#elif defined(__MINGW32__)
|
||||
# define PLATFORM_ID "MinGW"
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
# define PLATFORM_ID "Darwin"
|
||||
|
||||
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
||||
# define PLATFORM_ID "Windows"
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD)
|
||||
# define PLATFORM_ID "FreeBSD"
|
||||
|
||||
#elif defined(__NetBSD__) || defined(__NetBSD)
|
||||
# define PLATFORM_ID "NetBSD"
|
||||
|
||||
#elif defined(__OpenBSD__) || defined(__OPENBSD)
|
||||
# define PLATFORM_ID "OpenBSD"
|
||||
|
||||
#elif defined(__sun) || defined(sun)
|
||||
# define PLATFORM_ID "SunOS"
|
||||
|
||||
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
|
||||
# define PLATFORM_ID "AIX"
|
||||
|
||||
#elif defined(__hpux) || defined(__hpux__)
|
||||
# define PLATFORM_ID "HP-UX"
|
||||
|
||||
#elif defined(__HAIKU__)
|
||||
# define PLATFORM_ID "Haiku"
|
||||
|
||||
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
|
||||
# define PLATFORM_ID "BeOS"
|
||||
|
||||
#elif defined(__QNX__) || defined(__QNXNTO__)
|
||||
# define PLATFORM_ID "QNX"
|
||||
|
||||
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
|
||||
# define PLATFORM_ID "Tru64"
|
||||
|
||||
#elif defined(__riscos) || defined(__riscos__)
|
||||
# define PLATFORM_ID "RISCos"
|
||||
|
||||
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
|
||||
# define PLATFORM_ID "SINIX"
|
||||
|
||||
#elif defined(__UNIX_SV__)
|
||||
# define PLATFORM_ID "UNIX_SV"
|
||||
|
||||
#elif defined(__bsdos__)
|
||||
# define PLATFORM_ID "BSDOS"
|
||||
|
||||
#elif defined(_MPRAS) || defined(MPRAS)
|
||||
# define PLATFORM_ID "MP-RAS"
|
||||
|
||||
#elif defined(__osf) || defined(__osf__)
|
||||
# define PLATFORM_ID "OSF1"
|
||||
|
||||
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
|
||||
# define PLATFORM_ID "SCO_SV"
|
||||
|
||||
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
|
||||
# define PLATFORM_ID "ULTRIX"
|
||||
|
||||
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
|
||||
# define PLATFORM_ID "Xenix"
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(__LINUX__)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
# elif defined(__DOS__)
|
||||
# define PLATFORM_ID "DOS"
|
||||
|
||||
# elif defined(__OS2__)
|
||||
# define PLATFORM_ID "OS2"
|
||||
|
||||
# elif defined(__WINDOWS__)
|
||||
# define PLATFORM_ID "Windows3x"
|
||||
|
||||
# elif defined(__VXWORKS__)
|
||||
# define PLATFORM_ID "VxWorks"
|
||||
|
||||
# else /* unknown platform */
|
||||
# define PLATFORM_ID
|
||||
# endif
|
||||
|
||||
#elif defined(__INTEGRITY)
|
||||
# if defined(INT_178B)
|
||||
# define PLATFORM_ID "Integrity178"
|
||||
|
||||
# else /* regular Integrity */
|
||||
# define PLATFORM_ID "Integrity"
|
||||
# endif
|
||||
|
||||
#else /* unknown platform */
|
||||
# define PLATFORM_ID
|
||||
|
||||
#endif
|
||||
|
||||
/* For windows compilers MSVC and Intel we can determine
|
||||
the architecture of the compiler being used. This is because
|
||||
the compilers do not have flags that can change the architecture,
|
||||
but rather depend on which compiler is being used
|
||||
*/
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
# if defined(_M_IA64)
|
||||
# define ARCHITECTURE_ID "IA64"
|
||||
|
||||
# elif defined(_M_ARM64EC)
|
||||
# define ARCHITECTURE_ID "ARM64EC"
|
||||
|
||||
# elif defined(_M_X64) || defined(_M_AMD64)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# elif defined(_M_ARM64)
|
||||
# define ARCHITECTURE_ID "ARM64"
|
||||
|
||||
# elif defined(_M_ARM)
|
||||
# if _M_ARM == 4
|
||||
# define ARCHITECTURE_ID "ARMV4I"
|
||||
# elif _M_ARM == 5
|
||||
# define ARCHITECTURE_ID "ARMV5I"
|
||||
# else
|
||||
# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
|
||||
# endif
|
||||
|
||||
# elif defined(_M_MIPS)
|
||||
# define ARCHITECTURE_ID "MIPS"
|
||||
|
||||
# elif defined(_M_SH)
|
||||
# define ARCHITECTURE_ID "SHx"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(_M_I86)
|
||||
# define ARCHITECTURE_ID "I86"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
||||
# if defined(__ICCARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__ICCRX__)
|
||||
# define ARCHITECTURE_ID "RX"
|
||||
|
||||
# elif defined(__ICCRH850__)
|
||||
# define ARCHITECTURE_ID "RH850"
|
||||
|
||||
# elif defined(__ICCRL78__)
|
||||
# define ARCHITECTURE_ID "RL78"
|
||||
|
||||
# elif defined(__ICCRISCV__)
|
||||
# define ARCHITECTURE_ID "RISCV"
|
||||
|
||||
# elif defined(__ICCAVR__)
|
||||
# define ARCHITECTURE_ID "AVR"
|
||||
|
||||
# elif defined(__ICC430__)
|
||||
# define ARCHITECTURE_ID "MSP430"
|
||||
|
||||
# elif defined(__ICCV850__)
|
||||
# define ARCHITECTURE_ID "V850"
|
||||
|
||||
# elif defined(__ICC8051__)
|
||||
# define ARCHITECTURE_ID "8051"
|
||||
|
||||
# elif defined(__ICCSTM8__)
|
||||
# define ARCHITECTURE_ID "STM8"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__ghs__)
|
||||
# if defined(__PPC64__)
|
||||
# define ARCHITECTURE_ID "PPC64"
|
||||
|
||||
# elif defined(__ppc__)
|
||||
# define ARCHITECTURE_ID "PPC"
|
||||
|
||||
# elif defined(__ARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__x86_64__)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(__i386__)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__TI_COMPILER_VERSION__)
|
||||
# if defined(__TI_ARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__MSP430__)
|
||||
# define ARCHITECTURE_ID "MSP430"
|
||||
|
||||
# elif defined(__TMS320C28XX__)
|
||||
# define ARCHITECTURE_ID "TMS320C28x"
|
||||
|
||||
# elif defined(__TMS320C6X__) || defined(_TMS320C6X)
|
||||
# define ARCHITECTURE_ID "TMS320C6x"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#else
|
||||
# define ARCHITECTURE_ID
|
||||
#endif
|
||||
|
||||
/* Convert integer to decimal digit literals. */
|
||||
#define DEC(n) \
|
||||
('0' + (((n) / 10000000)%10)), \
|
||||
('0' + (((n) / 1000000)%10)), \
|
||||
('0' + (((n) / 100000)%10)), \
|
||||
('0' + (((n) / 10000)%10)), \
|
||||
('0' + (((n) / 1000)%10)), \
|
||||
('0' + (((n) / 100)%10)), \
|
||||
('0' + (((n) / 10)%10)), \
|
||||
('0' + ((n) % 10))
|
||||
|
||||
/* Convert integer to hex digit literals. */
|
||||
#define HEX(n) \
|
||||
('0' + ((n)>>28 & 0xF)), \
|
||||
('0' + ((n)>>24 & 0xF)), \
|
||||
('0' + ((n)>>20 & 0xF)), \
|
||||
('0' + ((n)>>16 & 0xF)), \
|
||||
('0' + ((n)>>12 & 0xF)), \
|
||||
('0' + ((n)>>8 & 0xF)), \
|
||||
('0' + ((n)>>4 & 0xF)), \
|
||||
('0' + ((n) & 0xF))
|
||||
|
||||
/* Construct a string literal encoding the version number. */
|
||||
#ifdef COMPILER_VERSION
|
||||
char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
|
||||
|
||||
/* Construct a string literal encoding the version number components. */
|
||||
#elif defined(COMPILER_VERSION_MAJOR)
|
||||
char const info_version[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
|
||||
COMPILER_VERSION_MAJOR,
|
||||
# ifdef COMPILER_VERSION_MINOR
|
||||
'.', COMPILER_VERSION_MINOR,
|
||||
# ifdef COMPILER_VERSION_PATCH
|
||||
'.', COMPILER_VERSION_PATCH,
|
||||
# ifdef COMPILER_VERSION_TWEAK
|
||||
'.', COMPILER_VERSION_TWEAK,
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct a string literal encoding the internal version number. */
|
||||
#ifdef COMPILER_VERSION_INTERNAL
|
||||
char const info_version_internal[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
|
||||
'i','n','t','e','r','n','a','l','[',
|
||||
COMPILER_VERSION_INTERNAL,']','\0'};
|
||||
#elif defined(COMPILER_VERSION_INTERNAL_STR)
|
||||
char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
|
||||
#endif
|
||||
|
||||
/* Construct a string literal encoding the version number components. */
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
char const info_simulate_version[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
|
||||
SIMULATE_VERSION_MAJOR,
|
||||
# ifdef SIMULATE_VERSION_MINOR
|
||||
'.', SIMULATE_VERSION_MINOR,
|
||||
# ifdef SIMULATE_VERSION_PATCH
|
||||
'.', SIMULATE_VERSION_PATCH,
|
||||
# ifdef SIMULATE_VERSION_TWEAK
|
||||
'.', SIMULATE_VERSION_TWEAK,
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
|
||||
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
|
||||
|
||||
|
||||
|
||||
#if !defined(__STDC__) && !defined(__clang__)
|
||||
# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__)
|
||||
# define C_VERSION "90"
|
||||
# else
|
||||
# define C_VERSION
|
||||
# endif
|
||||
#elif __STDC_VERSION__ > 201710L
|
||||
# define C_VERSION "23"
|
||||
#elif __STDC_VERSION__ >= 201710L
|
||||
# define C_VERSION "17"
|
||||
#elif __STDC_VERSION__ >= 201000L
|
||||
# define C_VERSION "11"
|
||||
#elif __STDC_VERSION__ >= 199901L
|
||||
# define C_VERSION "99"
|
||||
#else
|
||||
# define C_VERSION "90"
|
||||
#endif
|
||||
const char* info_language_standard_default =
|
||||
"INFO" ":" "standard_default[" C_VERSION "]";
|
||||
|
||||
const char* info_language_extensions_default = "INFO" ":" "extensions_default["
|
||||
/* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */
|
||||
#if (defined(__clang__) || defined(__GNUC__) || \
|
||||
defined(__TI_COMPILER_VERSION__)) && \
|
||||
!defined(__STRICT_ANSI__) && !defined(_MSC_VER)
|
||||
"ON"
|
||||
#else
|
||||
"OFF"
|
||||
#endif
|
||||
"]";
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef ID_VOID_MAIN
|
||||
void main() {}
|
||||
#else
|
||||
# if defined(__CLASSIC_C__)
|
||||
int main(argc, argv) int argc; char *argv[];
|
||||
# else
|
||||
int main(int argc, char* argv[])
|
||||
# endif
|
||||
{
|
||||
int require = 0;
|
||||
require += info_compiler[argc];
|
||||
require += info_platform[argc];
|
||||
require += info_arch[argc];
|
||||
#ifdef COMPILER_VERSION_MAJOR
|
||||
require += info_version[argc];
|
||||
#endif
|
||||
#ifdef COMPILER_VERSION_INTERNAL
|
||||
require += info_version_internal[argc];
|
||||
#endif
|
||||
#ifdef SIMULATE_ID
|
||||
require += info_simulate[argc];
|
||||
#endif
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
require += info_simulate_version[argc];
|
||||
#endif
|
||||
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
|
||||
require += info_cray[argc];
|
||||
#endif
|
||||
require += info_language_standard_default[argc];
|
||||
require += info_language_extensions_default[argc];
|
||||
(void)argv;
|
||||
return require;
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,791 @@
|
||||
/* This source file must have a .cpp extension so that all C++ compilers
|
||||
recognize the extension without flags. Borland does not know .cxx for
|
||||
example. */
|
||||
#ifndef __cplusplus
|
||||
# error "A C compiler has been selected for C++."
|
||||
#endif
|
||||
|
||||
#if !defined(__has_include)
|
||||
/* If the compiler does not have __has_include, pretend the answer is
|
||||
always no. */
|
||||
# define __has_include(x) 0
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number components: V=Version, R=Revision, P=Patch
|
||||
Version date components: YYYY=Year, MM=Month, DD=Day */
|
||||
|
||||
#if defined(__COMO__)
|
||||
# define COMPILER_ID "Comeau"
|
||||
/* __COMO_VERSION__ = VRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100)
|
||||
|
||||
#elif defined(__INTEL_COMPILER) || defined(__ICC)
|
||||
# define COMPILER_ID "Intel"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# if defined(__GNUC__)
|
||||
# define SIMULATE_ID "GNU"
|
||||
# endif
|
||||
/* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
|
||||
except that a few beta releases use the old format with V=2021. */
|
||||
# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
|
||||
# if defined(__INTEL_COMPILER_UPDATE)
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
|
||||
# else
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
|
||||
# endif
|
||||
# else
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
|
||||
/* The third version component from --version is an update index,
|
||||
but no macro is provided for it. */
|
||||
# define COMPILER_VERSION_PATCH DEC(0)
|
||||
# endif
|
||||
# if defined(__INTEL_COMPILER_BUILD_DATE)
|
||||
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
|
||||
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
|
||||
# endif
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
# if defined(__GNUC__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
|
||||
# elif defined(__GNUG__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
|
||||
# endif
|
||||
# if defined(__GNUC_MINOR__)
|
||||
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
# endif
|
||||
# if defined(__GNUC_PATCHLEVEL__)
|
||||
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
|
||||
# define COMPILER_ID "IntelLLVM"
|
||||
#if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
#endif
|
||||
#if defined(__GNUC__)
|
||||
# define SIMULATE_ID "GNU"
|
||||
#endif
|
||||
/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
|
||||
* later. Look for 6 digit vs. 8 digit version number to decide encoding.
|
||||
* VVVV is no smaller than the current year when a version is released.
|
||||
*/
|
||||
#if __INTEL_LLVM_COMPILER < 1000000L
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10)
|
||||
#else
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
|
||||
#endif
|
||||
#if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
#endif
|
||||
#if defined(__GNUC__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
|
||||
#elif defined(__GNUG__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
|
||||
#endif
|
||||
#if defined(__GNUC_MINOR__)
|
||||
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
#endif
|
||||
#if defined(__GNUC_PATCHLEVEL__)
|
||||
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
#endif
|
||||
|
||||
#elif defined(__PATHCC__)
|
||||
# define COMPILER_ID "PathScale"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
|
||||
# if defined(__PATHCC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
|
||||
# define COMPILER_ID "Embarcadero"
|
||||
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
|
||||
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
|
||||
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
# define COMPILER_ID "Borland"
|
||||
/* __BORLANDC__ = 0xVRR */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
|
||||
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
|
||||
|
||||
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
|
||||
# define COMPILER_ID "Watcom"
|
||||
/* __WATCOMC__ = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# define COMPILER_ID "OpenWatcom"
|
||||
/* __WATCOMC__ = VVRP + 1100 */
|
||||
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__SUNPRO_CC)
|
||||
# define COMPILER_ID "SunPro"
|
||||
# if __SUNPRO_CC >= 0x5100
|
||||
/* __SUNPRO_CC = 0xVRRP */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12)
|
||||
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
|
||||
# else
|
||||
/* __SUNPRO_CC = 0xVRP */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8)
|
||||
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
|
||||
# endif
|
||||
|
||||
#elif defined(__HP_aCC)
|
||||
# define COMPILER_ID "HP"
|
||||
/* __HP_aCC = VVRRPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100)
|
||||
|
||||
#elif defined(__DECCXX)
|
||||
# define COMPILER_ID "Compaq"
|
||||
/* __DECCXX_VER = VVRRTPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000)
|
||||
|
||||
#elif defined(__IBMCPP__) && defined(__COMPILER_VER__)
|
||||
# define COMPILER_ID "zOS"
|
||||
/* __IBMCPP__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
|
||||
|
||||
#elif defined(__ibmxl__) && defined(__clang__)
|
||||
# define COMPILER_ID "XLClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
|
||||
# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
|
||||
|
||||
|
||||
#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800
|
||||
# define COMPILER_ID "XL"
|
||||
/* __IBMCPP__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
|
||||
|
||||
#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800
|
||||
# define COMPILER_ID "VisualAge"
|
||||
/* __IBMCPP__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
|
||||
|
||||
#elif defined(__NVCOMPILER)
|
||||
# define COMPILER_ID "NVHPC"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
|
||||
# if defined(__NVCOMPILER_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__PGI)
|
||||
# define COMPILER_ID "PGI"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
|
||||
# if defined(__PGIC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_CRAYC)
|
||||
# define COMPILER_ID "Cray"
|
||||
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
|
||||
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
|
||||
|
||||
#elif defined(__TI_COMPILER_VERSION__)
|
||||
# define COMPILER_ID "TI"
|
||||
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
|
||||
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
|
||||
|
||||
#elif defined(__CLANG_FUJITSU)
|
||||
# define COMPILER_ID "FujitsuClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
|
||||
# define COMPILER_VERSION_INTERNAL_STR __clang_version__
|
||||
|
||||
|
||||
#elif defined(__FUJITSU)
|
||||
# define COMPILER_ID "Fujitsu"
|
||||
# if defined(__FCC_version__)
|
||||
# define COMPILER_VERSION __FCC_version__
|
||||
# elif defined(__FCC_major__)
|
||||
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
|
||||
# endif
|
||||
# if defined(__fcc_version)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
|
||||
# elif defined(__FCC_VERSION)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
|
||||
# endif
|
||||
|
||||
|
||||
#elif defined(__ghs__)
|
||||
# define COMPILER_ID "GHS"
|
||||
/* __GHS_VERSION_NUMBER = VVVVRP */
|
||||
# ifdef __GHS_VERSION_NUMBER
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__SCO_VERSION__)
|
||||
# define COMPILER_ID "SCO"
|
||||
|
||||
#elif defined(__ARMCC_VERSION) && !defined(__clang__)
|
||||
# define COMPILER_ID "ARMCC"
|
||||
#if __ARMCC_VERSION >= 1000000
|
||||
/* __ARMCC_VERSION = VRRPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
||||
#else
|
||||
/* __ARMCC_VERSION = VRPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
||||
#endif
|
||||
|
||||
|
||||
#elif defined(__clang__) && defined(__apple_build_version__)
|
||||
# define COMPILER_ID "AppleClang"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
|
||||
|
||||
#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
|
||||
# define COMPILER_ID "ARMClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
|
||||
|
||||
#elif defined(__clang__)
|
||||
# define COMPILER_ID "Clang"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
|
||||
#elif defined(__GNUC__) || defined(__GNUG__)
|
||||
# define COMPILER_ID "GNU"
|
||||
# if defined(__GNUC__)
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
|
||||
# else
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GNUG__)
|
||||
# endif
|
||||
# if defined(__GNUC_MINOR__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
# endif
|
||||
# if defined(__GNUC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
# define COMPILER_ID "MSVC"
|
||||
/* _MSC_VER = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# if defined(_MSC_FULL_VER)
|
||||
# if _MSC_VER >= 1400
|
||||
/* _MSC_FULL_VER = VVRRPPPPP */
|
||||
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
|
||||
# else
|
||||
/* _MSC_FULL_VER = VVRRPPPP */
|
||||
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
|
||||
# endif
|
||||
# endif
|
||||
# if defined(_MSC_BUILD)
|
||||
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
|
||||
# endif
|
||||
|
||||
#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
|
||||
# define COMPILER_ID "ADSP"
|
||||
#if defined(__VISUALDSPVERSION__)
|
||||
/* __VISUALDSPVERSION__ = 0xVVRRPP00 */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
|
||||
# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
|
||||
#endif
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
||||
# define COMPILER_ID "IAR"
|
||||
# if defined(__VER__) && defined(__ICCARM__)
|
||||
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
|
||||
# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
||||
# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
|
||||
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
|
||||
# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
||||
# endif
|
||||
|
||||
|
||||
/* These compilers are either not known or too old to define an
|
||||
identification macro. Try to identify the platform and guess that
|
||||
it is the native compiler. */
|
||||
#elif defined(__hpux) || defined(__hpua)
|
||||
# define COMPILER_ID "HP"
|
||||
|
||||
#else /* unknown compiler */
|
||||
# define COMPILER_ID ""
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
|
||||
#ifdef SIMULATE_ID
|
||||
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
||||
#endif
|
||||
|
||||
#ifdef __QNXNTO__
|
||||
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
||||
#endif
|
||||
|
||||
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
|
||||
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
#endif
|
||||
|
||||
#define STRINGIFY_HELPER(X) #X
|
||||
#define STRINGIFY(X) STRINGIFY_HELPER(X)
|
||||
|
||||
/* Identify known platforms by name. */
|
||||
#if defined(__linux) || defined(__linux__) || defined(linux)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
#elif defined(__MSYS__)
|
||||
# define PLATFORM_ID "MSYS"
|
||||
|
||||
#elif defined(__CYGWIN__)
|
||||
# define PLATFORM_ID "Cygwin"
|
||||
|
||||
#elif defined(__MINGW32__)
|
||||
# define PLATFORM_ID "MinGW"
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
# define PLATFORM_ID "Darwin"
|
||||
|
||||
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
||||
# define PLATFORM_ID "Windows"
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD)
|
||||
# define PLATFORM_ID "FreeBSD"
|
||||
|
||||
#elif defined(__NetBSD__) || defined(__NetBSD)
|
||||
# define PLATFORM_ID "NetBSD"
|
||||
|
||||
#elif defined(__OpenBSD__) || defined(__OPENBSD)
|
||||
# define PLATFORM_ID "OpenBSD"
|
||||
|
||||
#elif defined(__sun) || defined(sun)
|
||||
# define PLATFORM_ID "SunOS"
|
||||
|
||||
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
|
||||
# define PLATFORM_ID "AIX"
|
||||
|
||||
#elif defined(__hpux) || defined(__hpux__)
|
||||
# define PLATFORM_ID "HP-UX"
|
||||
|
||||
#elif defined(__HAIKU__)
|
||||
# define PLATFORM_ID "Haiku"
|
||||
|
||||
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
|
||||
# define PLATFORM_ID "BeOS"
|
||||
|
||||
#elif defined(__QNX__) || defined(__QNXNTO__)
|
||||
# define PLATFORM_ID "QNX"
|
||||
|
||||
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
|
||||
# define PLATFORM_ID "Tru64"
|
||||
|
||||
#elif defined(__riscos) || defined(__riscos__)
|
||||
# define PLATFORM_ID "RISCos"
|
||||
|
||||
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
|
||||
# define PLATFORM_ID "SINIX"
|
||||
|
||||
#elif defined(__UNIX_SV__)
|
||||
# define PLATFORM_ID "UNIX_SV"
|
||||
|
||||
#elif defined(__bsdos__)
|
||||
# define PLATFORM_ID "BSDOS"
|
||||
|
||||
#elif defined(_MPRAS) || defined(MPRAS)
|
||||
# define PLATFORM_ID "MP-RAS"
|
||||
|
||||
#elif defined(__osf) || defined(__osf__)
|
||||
# define PLATFORM_ID "OSF1"
|
||||
|
||||
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
|
||||
# define PLATFORM_ID "SCO_SV"
|
||||
|
||||
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
|
||||
# define PLATFORM_ID "ULTRIX"
|
||||
|
||||
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
|
||||
# define PLATFORM_ID "Xenix"
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(__LINUX__)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
# elif defined(__DOS__)
|
||||
# define PLATFORM_ID "DOS"
|
||||
|
||||
# elif defined(__OS2__)
|
||||
# define PLATFORM_ID "OS2"
|
||||
|
||||
# elif defined(__WINDOWS__)
|
||||
# define PLATFORM_ID "Windows3x"
|
||||
|
||||
# elif defined(__VXWORKS__)
|
||||
# define PLATFORM_ID "VxWorks"
|
||||
|
||||
# else /* unknown platform */
|
||||
# define PLATFORM_ID
|
||||
# endif
|
||||
|
||||
#elif defined(__INTEGRITY)
|
||||
# if defined(INT_178B)
|
||||
# define PLATFORM_ID "Integrity178"
|
||||
|
||||
# else /* regular Integrity */
|
||||
# define PLATFORM_ID "Integrity"
|
||||
# endif
|
||||
|
||||
#else /* unknown platform */
|
||||
# define PLATFORM_ID
|
||||
|
||||
#endif
|
||||
|
||||
/* For windows compilers MSVC and Intel we can determine
|
||||
the architecture of the compiler being used. This is because
|
||||
the compilers do not have flags that can change the architecture,
|
||||
but rather depend on which compiler is being used
|
||||
*/
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
# if defined(_M_IA64)
|
||||
# define ARCHITECTURE_ID "IA64"
|
||||
|
||||
# elif defined(_M_ARM64EC)
|
||||
# define ARCHITECTURE_ID "ARM64EC"
|
||||
|
||||
# elif defined(_M_X64) || defined(_M_AMD64)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# elif defined(_M_ARM64)
|
||||
# define ARCHITECTURE_ID "ARM64"
|
||||
|
||||
# elif defined(_M_ARM)
|
||||
# if _M_ARM == 4
|
||||
# define ARCHITECTURE_ID "ARMV4I"
|
||||
# elif _M_ARM == 5
|
||||
# define ARCHITECTURE_ID "ARMV5I"
|
||||
# else
|
||||
# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
|
||||
# endif
|
||||
|
||||
# elif defined(_M_MIPS)
|
||||
# define ARCHITECTURE_ID "MIPS"
|
||||
|
||||
# elif defined(_M_SH)
|
||||
# define ARCHITECTURE_ID "SHx"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(_M_I86)
|
||||
# define ARCHITECTURE_ID "I86"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
||||
# if defined(__ICCARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__ICCRX__)
|
||||
# define ARCHITECTURE_ID "RX"
|
||||
|
||||
# elif defined(__ICCRH850__)
|
||||
# define ARCHITECTURE_ID "RH850"
|
||||
|
||||
# elif defined(__ICCRL78__)
|
||||
# define ARCHITECTURE_ID "RL78"
|
||||
|
||||
# elif defined(__ICCRISCV__)
|
||||
# define ARCHITECTURE_ID "RISCV"
|
||||
|
||||
# elif defined(__ICCAVR__)
|
||||
# define ARCHITECTURE_ID "AVR"
|
||||
|
||||
# elif defined(__ICC430__)
|
||||
# define ARCHITECTURE_ID "MSP430"
|
||||
|
||||
# elif defined(__ICCV850__)
|
||||
# define ARCHITECTURE_ID "V850"
|
||||
|
||||
# elif defined(__ICC8051__)
|
||||
# define ARCHITECTURE_ID "8051"
|
||||
|
||||
# elif defined(__ICCSTM8__)
|
||||
# define ARCHITECTURE_ID "STM8"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__ghs__)
|
||||
# if defined(__PPC64__)
|
||||
# define ARCHITECTURE_ID "PPC64"
|
||||
|
||||
# elif defined(__ppc__)
|
||||
# define ARCHITECTURE_ID "PPC"
|
||||
|
||||
# elif defined(__ARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__x86_64__)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(__i386__)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__TI_COMPILER_VERSION__)
|
||||
# if defined(__TI_ARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__MSP430__)
|
||||
# define ARCHITECTURE_ID "MSP430"
|
||||
|
||||
# elif defined(__TMS320C28XX__)
|
||||
# define ARCHITECTURE_ID "TMS320C28x"
|
||||
|
||||
# elif defined(__TMS320C6X__) || defined(_TMS320C6X)
|
||||
# define ARCHITECTURE_ID "TMS320C6x"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#else
|
||||
# define ARCHITECTURE_ID
|
||||
#endif
|
||||
|
||||
/* Convert integer to decimal digit literals. */
|
||||
#define DEC(n) \
|
||||
('0' + (((n) / 10000000)%10)), \
|
||||
('0' + (((n) / 1000000)%10)), \
|
||||
('0' + (((n) / 100000)%10)), \
|
||||
('0' + (((n) / 10000)%10)), \
|
||||
('0' + (((n) / 1000)%10)), \
|
||||
('0' + (((n) / 100)%10)), \
|
||||
('0' + (((n) / 10)%10)), \
|
||||
('0' + ((n) % 10))
|
||||
|
||||
/* Convert integer to hex digit literals. */
|
||||
#define HEX(n) \
|
||||
('0' + ((n)>>28 & 0xF)), \
|
||||
('0' + ((n)>>24 & 0xF)), \
|
||||
('0' + ((n)>>20 & 0xF)), \
|
||||
('0' + ((n)>>16 & 0xF)), \
|
||||
('0' + ((n)>>12 & 0xF)), \
|
||||
('0' + ((n)>>8 & 0xF)), \
|
||||
('0' + ((n)>>4 & 0xF)), \
|
||||
('0' + ((n) & 0xF))
|
||||
|
||||
/* Construct a string literal encoding the version number. */
|
||||
#ifdef COMPILER_VERSION
|
||||
char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
|
||||
|
||||
/* Construct a string literal encoding the version number components. */
|
||||
#elif defined(COMPILER_VERSION_MAJOR)
|
||||
char const info_version[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
|
||||
COMPILER_VERSION_MAJOR,
|
||||
# ifdef COMPILER_VERSION_MINOR
|
||||
'.', COMPILER_VERSION_MINOR,
|
||||
# ifdef COMPILER_VERSION_PATCH
|
||||
'.', COMPILER_VERSION_PATCH,
|
||||
# ifdef COMPILER_VERSION_TWEAK
|
||||
'.', COMPILER_VERSION_TWEAK,
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct a string literal encoding the internal version number. */
|
||||
#ifdef COMPILER_VERSION_INTERNAL
|
||||
char const info_version_internal[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
|
||||
'i','n','t','e','r','n','a','l','[',
|
||||
COMPILER_VERSION_INTERNAL,']','\0'};
|
||||
#elif defined(COMPILER_VERSION_INTERNAL_STR)
|
||||
char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
|
||||
#endif
|
||||
|
||||
/* Construct a string literal encoding the version number components. */
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
char const info_simulate_version[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
|
||||
SIMULATE_VERSION_MAJOR,
|
||||
# ifdef SIMULATE_VERSION_MINOR
|
||||
'.', SIMULATE_VERSION_MINOR,
|
||||
# ifdef SIMULATE_VERSION_PATCH
|
||||
'.', SIMULATE_VERSION_PATCH,
|
||||
# ifdef SIMULATE_VERSION_TWEAK
|
||||
'.', SIMULATE_VERSION_TWEAK,
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
|
||||
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
|
||||
|
||||
|
||||
|
||||
#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L
|
||||
# if defined(__INTEL_CXX11_MODE__)
|
||||
# if defined(__cpp_aggregate_nsdmi)
|
||||
# define CXX_STD 201402L
|
||||
# else
|
||||
# define CXX_STD 201103L
|
||||
# endif
|
||||
# else
|
||||
# define CXX_STD 199711L
|
||||
# endif
|
||||
#elif defined(_MSC_VER) && defined(_MSVC_LANG)
|
||||
# define CXX_STD _MSVC_LANG
|
||||
#else
|
||||
# define CXX_STD __cplusplus
|
||||
#endif
|
||||
|
||||
const char* info_language_standard_default = "INFO" ":" "standard_default["
|
||||
#if CXX_STD > 202002L
|
||||
"23"
|
||||
#elif CXX_STD > 201703L
|
||||
"20"
|
||||
#elif CXX_STD >= 201703L
|
||||
"17"
|
||||
#elif CXX_STD >= 201402L
|
||||
"14"
|
||||
#elif CXX_STD >= 201103L
|
||||
"11"
|
||||
#else
|
||||
"98"
|
||||
#endif
|
||||
"]";
|
||||
|
||||
const char* info_language_extensions_default = "INFO" ":" "extensions_default["
|
||||
/* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */
|
||||
#if (defined(__clang__) || defined(__GNUC__) || \
|
||||
defined(__TI_COMPILER_VERSION__)) && \
|
||||
!defined(__STRICT_ANSI__) && !defined(_MSC_VER)
|
||||
"ON"
|
||||
#else
|
||||
"OFF"
|
||||
#endif
|
||||
"]";
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int require = 0;
|
||||
require += info_compiler[argc];
|
||||
require += info_platform[argc];
|
||||
#ifdef COMPILER_VERSION_MAJOR
|
||||
require += info_version[argc];
|
||||
#endif
|
||||
#ifdef COMPILER_VERSION_INTERNAL
|
||||
require += info_version_internal[argc];
|
||||
#endif
|
||||
#ifdef SIMULATE_ID
|
||||
require += info_simulate[argc];
|
||||
#endif
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
require += info_simulate_version[argc];
|
||||
#endif
|
||||
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
|
||||
require += info_cray[argc];
|
||||
#endif
|
||||
require += info_language_standard_default[argc];
|
||||
require += info_language_extensions_default[argc];
|
||||
(void)argv;
|
||||
return require;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
|
||||
13
openair1/PHY/CODING/nrLDPC_decoder/CMakeLists.txt
Normal file
13
openair1/PHY/CODING/nrLDPC_decoder/CMakeLists.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(ldpc_decoder_test C)
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
add_executable(ldpc_decoder_test
|
||||
nrLDPC_decoder.c
|
||||
)
|
||||
1
openair1/PHY/CODING/nrLDPC_decoder/Imhere
Normal file
1
openair1/PHY/CODING/nrLDPC_decoder/Imhere
Normal file
@@ -0,0 +1 @@
|
||||
...
|
||||
BIN
openair1/PHY/CODING/nrLDPC_decoder/cuda_test
Executable file
BIN
openair1/PHY/CODING/nrLDPC_decoder/cuda_test
Executable file
Binary file not shown.
38
openair1/PHY/CODING/nrLDPC_decoder/cuda_test.cu
Normal file
38
openair1/PHY/CODING/nrLDPC_decoder/cuda_test.cu
Normal file
@@ -0,0 +1,38 @@
|
||||
#include <stdio.h>
|
||||
#include <cuda_runtime.h>
|
||||
|
||||
__global__ void hello_kernel(int id) {
|
||||
if (threadIdx.x == 0 && blockIdx.x == 0) {
|
||||
printf("Hello from GPU kernel, id=%d\n", id);
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
// 查询 GPU 属性
|
||||
int device;
|
||||
cudaGetDevice(&device);
|
||||
cudaDeviceProp prop;
|
||||
cudaGetDeviceProperties(&prop, device);
|
||||
printf("Using device %d: %s (compute capability %d.%d)\n",
|
||||
device, prop.name, prop.major, prop.minor);
|
||||
|
||||
// 启动 kernel
|
||||
hello_kernel<<<1,1>>>(42);
|
||||
|
||||
// 检查 launch 是否成功
|
||||
cudaError_t err = cudaGetLastError();
|
||||
if (err != cudaSuccess) {
|
||||
printf("Kernel launch error: %s\n", cudaGetErrorString(err));
|
||||
return -1;
|
||||
}
|
||||
|
||||
// 同步,等待 GPU 执行完
|
||||
err = cudaDeviceSynchronize();
|
||||
if (err != cudaSuccess) {
|
||||
printf("Kernel execution error: %s\n", cudaGetErrorString(err));
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("Kernel finished successfully!\n");
|
||||
return 0;
|
||||
}
|
||||
14
openair1/PHY/CODING/nrLDPC_decoder/decoder_graphs.h
Normal file
14
openair1/PHY/CODING/nrLDPC_decoder/decoder_graphs.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
#include <cuda_runtime.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern cudaGraph_t decoderGraphs[MAX_NUM_DLSCH_SEGMENTS];
|
||||
extern cudaGraphExec_t decoderGraphExec[MAX_NUM_DLSCH_SEGMENTS];
|
||||
extern bool graphCreated[MAX_NUM_DLSCH_SEGMENTS];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
18
openair1/PHY/CODING/nrLDPC_decoder/kernel_test.cu
Normal file
18
openair1/PHY/CODING/nrLDPC_decoder/kernel_test.cu
Normal file
@@ -0,0 +1,18 @@
|
||||
#if PARALLEL_STREAM
|
||||
#include <cstdio>
|
||||
|
||||
__global__ void test_kernel() {
|
||||
if (threadIdx.x == 0 && blockIdx.x == 0) {
|
||||
printf("Hello from test kernel!\n");
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" void run_test_kernel() {
|
||||
test_kernel<<<1,1>>>();
|
||||
cudaError_t err = cudaGetLastError();
|
||||
if (err != cudaSuccess) {
|
||||
printf("Kernel launch failed: %s\n", cudaGetErrorString(err));
|
||||
}
|
||||
cudaDeviceSynchronize();
|
||||
}
|
||||
#endif
|
||||
BIN
openair1/PHY/CODING/nrLDPC_decoder/lut
Executable file
BIN
openair1/PHY/CODING/nrLDPC_decoder/lut
Executable file
Binary file not shown.
59
openair1/PHY/CODING/nrLDPC_decoder/lut_gen.c
Normal file
59
openair1/PHY/CODING/nrLDPC_decoder/lut_gen.c
Normal file
@@ -0,0 +1,59 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
const uint8_t lut_numBnInBnGroups_BG1_R13[30] = {42, 0, 0, 1, 1, 2, 4, 3, 1, 4, 3, 4, 1, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1};
|
||||
|
||||
int total_blocks = 0;
|
||||
for (int g = 1; g <= 30; g++) {
|
||||
int num_bn = lut_numBnInBnGroups_BG1_R13[g - 1];
|
||||
total_blocks += num_bn; //* g;
|
||||
}
|
||||
printf("// Total inner blocks = %d\n", total_blocks);
|
||||
|
||||
printf("const uint8_t lut_InnerBlock[%d] = {\n", total_blocks);
|
||||
int cnt = 0;
|
||||
for (int g = 1; g <= 30; g++) {
|
||||
int num_bn = lut_numBnInBnGroups_BG1_R13[g - 1];
|
||||
for (int bn = 0; bn < num_bn; bn++) {
|
||||
|
||||
printf("%d,", g);
|
||||
cnt++;
|
||||
if (cnt % 20 == 0)
|
||||
printf("\n");
|
||||
|
||||
}
|
||||
}
|
||||
printf("\n};\n\n");
|
||||
|
||||
printf("const uint8_t lut_InnerInnerBlock[%d] = {\n", total_blocks);
|
||||
cnt = 0;
|
||||
for (int g = 1; g <= 30; g++) {
|
||||
int num_bn = lut_numBnInBnGroups_BG1_R13[g - 1];
|
||||
for (int bn = 0; bn < num_bn; bn++) {
|
||||
for (int k = 1; k <= g; k++) {
|
||||
printf("%d,", k);
|
||||
cnt++;
|
||||
if (cnt % 20 == 0)
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("\n};\n");
|
||||
printf("const uint8_t lut_BnIdx[%d] = {\n", total_blocks);
|
||||
cnt = 0;
|
||||
for (int g = 1; g <= 30; g++) {
|
||||
int num_bn = lut_numBnInBnGroups_BG1_R13[g - 1];
|
||||
for (int bn = 0; bn < num_bn; bn++) {
|
||||
|
||||
printf("%d,", bn + 1); // 从1开始计数
|
||||
cnt++;
|
||||
if (cnt % 20 == 0)
|
||||
printf("\n");
|
||||
|
||||
}
|
||||
}
|
||||
printf("\n};\n");
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
#include <cuda_runtime.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include "nrLDPC_types.h"
|
||||
|
||||
__device__ void gpu_sleep(unsigned int cycles)
|
||||
{
|
||||
clock_t start = clock();
|
||||
while ((clock() - start) < cycles) {
|
||||
// Busy wait
|
||||
}
|
||||
}
|
||||
|
||||
__device__ void bnProcPcKernel_int8_Gn(const int8_t *__restrict__ d_bnProcBuf,
|
||||
const int8_t *__restrict__ d_bnProcBufRes,
|
||||
const int8_t *__restrict__ d_llrProcBuf,
|
||||
const int8_t *__restrict__ d_llrRes,
|
||||
int8_t lane,
|
||||
int8_t GrpIdx,
|
||||
int8_t BnIdx,
|
||||
int8_t GrpNum,
|
||||
int Zc)
|
||||
// cg::grid_group grid)
|
||||
{
|
||||
const uint8_t NUM = (const uint8_t)GrpIdx;
|
||||
|
||||
int8_t *d_bnProcBuf_BnIdx = (int8_t *)(d_bnProcBuf + (BnIdx - 1) * Zc);
|
||||
int8_t *d_bnProcBufRes_BnIdx = (int8_t *)(d_bnProcBufRes + (BnIdx - 1) * Zc);
|
||||
int8_t *d_llrProcBuf_BnIdx = (int8_t *)(d_llrProcBuf + (BnIdx - 1) * Zc);
|
||||
int8_t *d_llrRes_BnIdx = (int8_t *)(d_llrRes + (BnIdx - 1) * Zc);
|
||||
|
||||
// First part: update llrRes if MsgIdx == 1
|
||||
int32_t *bnProcBufPtr = (int32_t *)(d_bnProcBuf_BnIdx + lane * 4);
|
||||
|
||||
int32_t MsgSum = bnProcBufPtr[0];
|
||||
|
||||
for (uint8_t i = 1; i < NUM; i++) {
|
||||
int32_t ymm0 = bnProcBufPtr[(GrpNum * i * Zc) / 4];
|
||||
MsgSum = __vaddss4(MsgSum, ymm0);
|
||||
}
|
||||
|
||||
int32_t llrData = *(const int32_t *)(d_llrProcBuf_BnIdx + lane * 4);
|
||||
|
||||
int32_t ymm0Res = __vaddss4(MsgSum, llrData);
|
||||
|
||||
*(int32_t *)(d_llrRes_BnIdx + lane * 4) = ymm0Res;
|
||||
}
|
||||
|
||||
__device__ void bnProcKernel_int8_Gn(const int8_t *__restrict__ d_bnProcBuf,
|
||||
const int8_t *__restrict__ d_bnProcBufRes,
|
||||
const int8_t *__restrict__ d_llrProcBuf,
|
||||
const int8_t *__restrict__ d_llrRes,
|
||||
int8_t lane,
|
||||
int8_t GrpIdx,
|
||||
int8_t MsgIdx,
|
||||
int8_t BnIdx,
|
||||
int8_t GrpNum,
|
||||
int Zc)
|
||||
// cg::grid_group grid)
|
||||
{
|
||||
const uint8_t NUM = (const uint8_t)GrpIdx;
|
||||
|
||||
int8_t *d_bnProcBuf_BnIdx = (int8_t *)(d_bnProcBuf + (BnIdx - 1) * Zc);
|
||||
int8_t *d_bnProcBufRes_BnIdx = (int8_t *)(d_bnProcBufRes + (BnIdx - 1) * Zc);
|
||||
int8_t *d_llrProcBuf_BnIdx = (int8_t *)(d_llrProcBuf + (BnIdx - 1) * Zc);
|
||||
int8_t *d_llrRes_BnIdx = (int8_t *)(d_llrRes + (BnIdx - 1) * Zc);
|
||||
|
||||
int32_t ymm0Res = *(const int32_t *)(d_llrRes_BnIdx + lane * 4);
|
||||
|
||||
int32_t prevMsg = *(const int32_t *)(d_bnProcBuf_BnIdx + (MsgIdx - 1) * GrpNum * Zc + lane * 4);
|
||||
|
||||
int32_t MsgRes = __vsubss4(ymm0Res, prevMsg);
|
||||
|
||||
*(int32_t *)(d_bnProcBufRes_BnIdx + (MsgIdx - 1) * GrpNum * Zc + lane * 4) = MsgRes;
|
||||
|
||||
// --------------------------
|
||||
// check MsgRes == 0 and print
|
||||
// --------------------------
|
||||
/*if (MsgRes == 0)
|
||||
{
|
||||
printf(
|
||||
"bnProcKernel_int8_Gn Debug | lane=%d | GrpIdx=%d | MsgIdx=%d | BnIdx=%d | GrpNum=%d | Zc=%d | ymm0Res=0x%08x |
|
||||
prevMsg=0x%08x | MsgRes=0x%08x\n", lane, GrpIdx, MsgIdx, BnIdx, GrpNum, Zc, ymm0Res, prevMsg, MsgRes
|
||||
);
|
||||
}*/
|
||||
}
|
||||
|
||||
__device__ void bnProcKernel_int8_Gn_United(const int8_t *__restrict__ d_bnProcBuf,
|
||||
const int8_t *__restrict__ d_bnProcBufRes,
|
||||
const int8_t *__restrict__ d_llrProcBuf,
|
||||
const int8_t *__restrict__ d_llrRes,
|
||||
int8_t lane,
|
||||
int8_t GrpIdx,
|
||||
int8_t MsgIdx,
|
||||
int8_t BnIdx,
|
||||
int8_t GrpNum,
|
||||
int Zc)
|
||||
// cg::grid_group grid)
|
||||
{
|
||||
const uint8_t NUM = (const uint8_t)GrpIdx;
|
||||
|
||||
int8_t *d_bnProcBuf_BnIdx = (int8_t *)(d_bnProcBuf + (BnIdx - 1) * Zc);
|
||||
int8_t *d_bnProcBufRes_BnIdx = (int8_t *)(d_bnProcBufRes + (BnIdx - 1) * Zc);
|
||||
int8_t *d_llrProcBuf_BnIdx = (int8_t *)(d_llrProcBuf + (BnIdx - 1) * Zc);
|
||||
int8_t *d_llrRes_BnIdx = (int8_t *)(d_llrRes + (BnIdx - 1) * Zc);
|
||||
|
||||
if (MsgIdx == 1) {
|
||||
int32_t *bnProcBufPtr = (int32_t *)(d_bnProcBuf_BnIdx + lane * 4);
|
||||
|
||||
int32_t MsgSum = bnProcBufPtr[0];
|
||||
|
||||
for (uint8_t i = 1; i < NUM; i++) {
|
||||
int32_t ymm0 = bnProcBufPtr[(GrpNum * i * Zc) / 4];
|
||||
MsgSum = __vaddss4(MsgSum, ymm0);
|
||||
}
|
||||
|
||||
int32_t llrData = *(const int32_t *)(d_llrProcBuf_BnIdx + lane * 4);
|
||||
|
||||
int32_t ymm0Res = __vaddss4(MsgSum, llrData);
|
||||
|
||||
*(int32_t *)(d_llrRes_BnIdx + lane * 4) = ymm0Res;
|
||||
}
|
||||
|
||||
__syncthreads();
|
||||
|
||||
int32_t ymm0Res = *(const int32_t *)(d_llrRes_BnIdx + lane * 4);
|
||||
|
||||
int32_t prevMsg = *(const int32_t *)(d_bnProcBuf_BnIdx + (MsgIdx - 1) * GrpNum * Zc + lane * 4);
|
||||
|
||||
int32_t MsgRes = __vsubss4(ymm0Res, prevMsg);
|
||||
|
||||
*(int32_t *)(d_bnProcBufRes_BnIdx + (MsgIdx - 1) * GrpNum * Zc + lane * 4) = MsgRes;
|
||||
|
||||
// --------------------------
|
||||
// check MsgRes == 0 and print
|
||||
// --------------------------
|
||||
/*if (MsgRes == 0)
|
||||
{
|
||||
printf(
|
||||
"bnProcKernel_int8_Gn Debug | lane=%d | GrpIdx=%d | MsgIdx=%d | BnIdx=%d | GrpNum=%d | Zc=%d | ymm0Res=0x%08x |
|
||||
prevMsg=0x%08x | MsgRes=0x%08x\n", lane, GrpIdx, MsgIdx, BnIdx, GrpNum, Zc, ymm0Res, prevMsg, MsgRes
|
||||
);
|
||||
}*/
|
||||
}
|
||||
1377
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_BnToCnPC_Kernel_BG1_cuda.h
Normal file
1377
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_BnToCnPC_Kernel_BG1_cuda.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,836 @@
|
||||
#pragma once
|
||||
|
||||
#include <cuda_runtime.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include "nrLDPC_types.h"
|
||||
|
||||
#define arrPos(a, b) a.d + b *a.dim2
|
||||
|
||||
enum CircShiftDirection { FORWARD = 0, INVERSE = 1 };
|
||||
enum CircShiftOp { PUT_BRICKS = 0, GET_BRICKS = 1 };
|
||||
|
||||
__device__ void moveBricks_circ(int8_t *__restrict__ dstBuf,
|
||||
uint16_t dstBuf_Offset,
|
||||
uint8_t *__restrict__ Four_Bricks,
|
||||
uint16_t Z,
|
||||
uint16_t cshift,
|
||||
CircShiftDirection dir,
|
||||
CircShiftOp op)
|
||||
{
|
||||
int8_t *DstBuf = (int8_t *)dstBuf;
|
||||
uint16_t shift;
|
||||
|
||||
if (dir == FORWARD) {
|
||||
shift = (Z - ((cshift + dstBuf_Offset) % Z)) % Z;
|
||||
} else {
|
||||
shift = (cshift + dstBuf_Offset) % Z;
|
||||
}
|
||||
|
||||
uint16_t pos = shift;
|
||||
uintptr_t ptr = (uintptr_t)(DstBuf + pos);
|
||||
|
||||
if (op == PUT_BRICKS) {
|
||||
// put bricks
|
||||
if ((pos + 3 < Z) && ((ptr & 0x3) == 0)) {
|
||||
*(uint32_t *)(DstBuf + pos) = *(const uint32_t *)(Four_Bricks);
|
||||
} else {
|
||||
for (uint16_t j = 0; j < 4; j++) {
|
||||
DstBuf[(pos + j) % Z] = Four_Bricks[j];
|
||||
}
|
||||
}
|
||||
} else if (op == GET_BRICKS) {
|
||||
// get bricks
|
||||
if ((pos + 3 < Z) && ((ptr & 0x3) == 0)) {
|
||||
*(uint32_t *)(Four_Bricks) = *(const uint32_t *)(DstBuf + pos);
|
||||
} else {
|
||||
for (uint16_t j = 0; j < 4; j++) {
|
||||
Four_Bricks[j] = DstBuf[(pos + j) % Z];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
__device__ __forceinline__ uint32_t __vxor4(const uint32_t *a, uint32_t *b)
|
||||
{
|
||||
return a[0] ^ b[0]; // increase accuracy
|
||||
}
|
||||
|
||||
__device__ __forceinline__ uint32_t __vsign4(const uint32_t *a, uint32_t *b)
|
||||
{
|
||||
uint32_t mask = __vcmples4(b[0] | 0x01010101, 0); // 0xFF / 0x00 per‑byte
|
||||
uint32_t bneg = __vneg4(a[0]);
|
||||
return (mask & bneg) | (~mask & a[0]); // Compute ±magnitude in two steps
|
||||
}
|
||||
|
||||
__device__ void cnProcKernel_int8_G3(const t_nrLDPC_lut *p_lut,
|
||||
const int8_t *__restrict__ d_cnBufAll,
|
||||
int8_t *__restrict__ d_cnOutAll,
|
||||
int8_t *__restrict__ d_bnBufAll,
|
||||
int tid,
|
||||
uint8_t groupId,
|
||||
uint8_t CnIdx,
|
||||
int Zc)
|
||||
{
|
||||
const uint8_t NUM = 3; // Gn = 3
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll; // output pointer each block tackle with
|
||||
|
||||
const int8_t *p_bnProcBuf = (const int8_t *)d_bnBufAll;
|
||||
|
||||
if (tid >= NUM * Zc / 4) // NUM * Zc / 4 is the number of threads assigned to each block
|
||||
return;
|
||||
const uint row = tid / 96; // row = 0,1,2 -> 3 BNs
|
||||
const uint lane = tid % 96; // lane = 0,1,...,95 -> one thread in one of 96 process units
|
||||
// and produce 1/96 of the Msg to one BN
|
||||
|
||||
// 1*384/4 = 96
|
||||
const uint16_t c_lut_idxG3[3][2] = {{96, 192}, {0, 192}, {0, 96}};
|
||||
|
||||
const uint baseShift = Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
// const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG3[row][0] * 4);
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
// loop starts here
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG3[row][1] * 4);
|
||||
/*if(row == 0 && blockIdx.x == 0){
|
||||
printf("In thread %d, in address offset: %d, ymm0 = %02x\n", tid, lane * 4 + c_lut_idxG3[row][0], ymm0);
|
||||
}*/
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
min = __vminu4(min, maxLLR);
|
||||
|
||||
*p_cnProcBufResBit = __vsign4(&min, &sgn);//0x13131313;
|
||||
uint8_t *BricksToBeMoved = (uint8_t *)p_cnProcBufResBit;
|
||||
|
||||
const uint16_t *lut_circShift_CNG = arrPos(p_lut->circShift[groupId], row);
|
||||
const uint32_t *lut_startAddrBnProcBuf_CNG = arrPos(p_lut->startAddrBnProcBuf[groupId], row);
|
||||
//const uint8_t *lut_bnPosBnProcBuf_CNG = arrPos(p_lut->bnPosBnProcBuf[groupId], row);
|
||||
|
||||
const int idxBn = lut_startAddrBnProcBuf_CNG[0];
|
||||
|
||||
// printf("tid = %d,row = %d\n", tid, row);
|
||||
|
||||
if (tid == 0) {
|
||||
//printf("moveBricks_circ call:\n");
|
||||
//printf("lut_startAddrBnProcBuf_CNG = %p\n", lut_startAddrBnProcBuf_CNG);
|
||||
//printf("lut_bnPosBnProcBuf_CNG = %p\n", lut_bnPosBnProcBuf_CNG);
|
||||
//printf("lut_startAddrBnProcBuf_CNG[%d] = %d\n", row,lut_startAddrBnProcBuf_CNG[row]);
|
||||
//printf("lut_bnPosBnProcBuf_CNG[%d] = %d\n", row,lut_bnPosBnProcBuf_CNG[row]);
|
||||
//printf("idxBn = %d\n", idxBn);
|
||||
//printf("dstBuf = %p\n", (int8_t *)&p_bnProcBuf[idxBn]);
|
||||
|
||||
//printf("dstBuf_Offset = %d\n", lane * 4);
|
||||
//printf("BricksToBeMoved = [%d, %d, %d, %d]\n", BricksToBeMoved[0], BricksToBeMoved[1], BricksToBeMoved[2], BricksToBeMoved[3]);
|
||||
//printf("Z = %d\n", Zc);
|
||||
//printf("cshift = %d\n", lut_circShift_CNG[CnIdx]);
|
||||
//printf("inverse = %d\n", INVERSE);
|
||||
}
|
||||
moveBricks_circ((int8_t *)&p_bnProcBuf[idxBn], lane * 4, BricksToBeMoved, Zc, lut_circShift_CNG[CnIdx], INVERSE, PUT_BRICKS);
|
||||
}
|
||||
|
||||
|
||||
__device__ void cnProcKernel_int8_G4(const t_nrLDPC_lut *p_lut,
|
||||
const int8_t *__restrict__ d_cnBufAll,
|
||||
int8_t *__restrict__ d_cnOutAll,
|
||||
int8_t *__restrict__ d_bnBufAll,
|
||||
int tid,
|
||||
uint8_t groupId,
|
||||
uint8_t CnIdx,
|
||||
int Zc )
|
||||
{
|
||||
const uint8_t NUM = 4; // Gn = 4
|
||||
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll; // output pointer each block tackle with
|
||||
|
||||
const int8_t *p_bnProcBuf = (const int8_t *)d_bnBufAll;
|
||||
|
||||
// if(tid == 1){
|
||||
// printf("\nThis is block %d in G4", blockIdx.x);
|
||||
//}
|
||||
if (tid >= NUM * Zc / 4)
|
||||
return;
|
||||
|
||||
const uint row = tid / 96;
|
||||
const uint lane = tid % 96;
|
||||
// 5*384/4 = 480
|
||||
const uint16_t c_lut_idxG4[4][3] = {
|
||||
|
||||
{480, 960, 1440},
|
||||
{0, 960, 1440},
|
||||
{0, 480, 1440},
|
||||
{0, 480, 960}};
|
||||
|
||||
const uint baseShift = 5 * Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
// const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
|
||||
const uint16_t *lut_circShift_CNG = arrPos(p_lut->circShift[groupId], row);
|
||||
const uint32_t *lut_startAddrBnProcBuf_CNG = arrPos(p_lut->startAddrBnProcBuf[groupId], row);
|
||||
const uint8_t *lut_bnPosBnProcBuf_CNG = arrPos(p_lut->bnPosBnProcBuf[groupId], row);
|
||||
|
||||
const int idxBn = lut_startAddrBnProcBuf_CNG[CnIdx] + lut_bnPosBnProcBuf_CNG[CnIdx] * Zc;
|
||||
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG4[row][0] * 4);
|
||||
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
//-------------------------loop starts here-------------------------------
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG4[row][1] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG4[row][2] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
min = __vminu4(min, maxLLR);
|
||||
*p_cnProcBufResBit = __vsign4(&min, &sgn); // 0x14141414;
|
||||
uint8_t *BricksToBeMoved = (uint8_t *)p_cnProcBufResBit;
|
||||
|
||||
if (tid == 0) {
|
||||
// printf("moveBricks_circ call:\n");
|
||||
// printf("lut_startAddrBnProcBuf_CNG = %p\n", lut_startAddrBnProcBuf_CNG);
|
||||
// printf("lut_bnPosBnProcBuf_CNG = %p\n", lut_bnPosBnProcBuf_CNG);
|
||||
// printf("lut_startAddrBnProcBuf_CNG[%d] = %d\n", row,lut_startAddrBnProcBuf_CNG[row]);
|
||||
// printf("lut_bnPosBnProcBuf_CNG[%d] = %d\n", row,lut_bnPosBnProcBuf_CNG[row]);
|
||||
// printf("idxBn = %d\n", idxBn);
|
||||
// printf("dstBuf = %p\n", (int8_t *)&p_bnProcBuf[idxBn]);
|
||||
|
||||
// printf("dstBuf_Offset = %d\n", lane * 4);
|
||||
// printf("BricksToBeMoved = [%d, %d, %d, %d]\n", BricksToBeMoved[0], BricksToBeMoved[1], BricksToBeMoved[2],
|
||||
// BricksToBeMoved[3]); printf("Z = %d\n", Zc); printf("cshift = %d\n", lut_circShift_CNG[CnIdx]); printf("inverse = %d\n",
|
||||
// INVERSE);
|
||||
}
|
||||
moveBricks_circ((int8_t *)&p_bnProcBuf[idxBn], lane * 4, BricksToBeMoved, Zc, lut_circShift_CNG[CnIdx], INVERSE, PUT_BRICKS);
|
||||
// if(row == 0 && blockIdx.x == 0){
|
||||
// printf("In thread %d, result = %02x\n", tid, result);
|
||||
// }
|
||||
}
|
||||
|
||||
__device__ void cnProcKernel_int8_G5(const t_nrLDPC_lut *p_lut,
|
||||
const int8_t *__restrict__ d_cnBufAll,
|
||||
int8_t *__restrict__ d_cnOutAll,
|
||||
int8_t *__restrict__ d_bnBufAll,
|
||||
int tid,
|
||||
uint8_t groupId,
|
||||
uint8_t CnIdx,
|
||||
int Zc )
|
||||
{
|
||||
const uint8_t NUM = 5; // Gn = 5
|
||||
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll; // output pointer each block tackle with
|
||||
|
||||
const int8_t *p_bnProcBuf = (const int8_t *)d_bnBufAll;
|
||||
|
||||
if (tid >= NUM * Zc / 4)
|
||||
return;
|
||||
|
||||
const uint row = tid / 96;
|
||||
const uint lane = tid % 96;
|
||||
// 18 * 384 / 4 = 1728
|
||||
const uint16_t c_lut_idxG5[5][4] = {
|
||||
|
||||
{1728, 3456, 5184, 6912},
|
||||
{0, 3456, 5184, 6912},
|
||||
{0, 1728, 5184, 6912},
|
||||
{0, 1728, 3456, 6912},
|
||||
{0, 1728, 3456, 5184}};
|
||||
|
||||
const uint baseShift = 18 * Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
// const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG5[row][0] * 4);
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
//-------------------------loop starts here-------------------------------
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG5[row][1] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG5[row][2] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG5[row][3] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
//-------------------------------------------------------------------------
|
||||
min = __vminu4(min, maxLLR);
|
||||
*p_cnProcBufResBit = __vsign4(&min, &sgn); // 0x15151515;
|
||||
uint8_t *BricksToBeMoved = (uint8_t *)p_cnProcBufResBit;
|
||||
|
||||
const uint16_t *lut_circShift_CNG = arrPos(p_lut->circShift[groupId], row);
|
||||
const uint32_t *lut_startAddrBnProcBuf_CNG = arrPos(p_lut->startAddrBnProcBuf[groupId], row);
|
||||
const uint8_t *lut_bnPosBnProcBuf_CNG = arrPos(p_lut->bnPosBnProcBuf[groupId], row);
|
||||
|
||||
const int idxBn = lut_startAddrBnProcBuf_CNG[CnIdx] + lut_bnPosBnProcBuf_CNG[CnIdx] * Zc;
|
||||
|
||||
moveBricks_circ((int8_t *)&p_bnProcBuf[idxBn], lane * 4, BricksToBeMoved, Zc, lut_circShift_CNG[CnIdx], INVERSE, PUT_BRICKS);
|
||||
}
|
||||
|
||||
__device__ void cnProcKernel_int8_G6(const t_nrLDPC_lut *p_lut,
|
||||
const int8_t *__restrict__ d_cnBufAll,
|
||||
int8_t *__restrict__ d_cnOutAll,
|
||||
int8_t *__restrict__ d_bnBufAll,
|
||||
int tid,
|
||||
uint8_t groupId,
|
||||
uint8_t CnIdx,
|
||||
int Zc )
|
||||
{
|
||||
const uint8_t NUM = 6; // Gn = 6
|
||||
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll; // output pointer each block tackle with
|
||||
|
||||
const int8_t *p_bnProcBuf = (const int8_t *)d_bnBufAll;
|
||||
|
||||
if (tid >= NUM * Zc / 4)
|
||||
return;
|
||||
|
||||
const uint row = tid / 96;
|
||||
const uint lane = tid % 96;
|
||||
// 8 * 384 / 4 = 768
|
||||
const uint16_t c_lut_idxG6[6][5] = {
|
||||
|
||||
{768, 1536, 2304, 3072, 3840},
|
||||
{0, 1536, 2304, 3072, 3840},
|
||||
{0, 768, 2304, 3072, 3840},
|
||||
{0, 768, 1536, 3072, 3840},
|
||||
{0, 768, 1536, 2304, 3840},
|
||||
{0, 768, 1536, 2304, 3072}};
|
||||
|
||||
const uint baseShift = 8 * Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
// const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG6[row][0] * 4);
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
//-------------------------loop starts here-------------------------------
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG6[row][1] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG6[row][2] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG6[row][3] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG6[row][4] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
//-------------------------------------------------------------------------
|
||||
min = __vminu4(min, maxLLR);
|
||||
*p_cnProcBufResBit = __vsign4(&min, &sgn); // 0x16161616;
|
||||
uint8_t *BricksToBeMoved = (uint8_t *)p_cnProcBufResBit;
|
||||
|
||||
const uint16_t *lut_circShift_CNG = arrPos(p_lut->circShift[groupId], row);
|
||||
const uint32_t *lut_startAddrBnProcBuf_CNG = arrPos(p_lut->startAddrBnProcBuf[groupId], row);
|
||||
const uint8_t *lut_bnPosBnProcBuf_CNG = arrPos(p_lut->bnPosBnProcBuf[groupId], row);
|
||||
|
||||
const int idxBn = lut_startAddrBnProcBuf_CNG[CnIdx] + lut_bnPosBnProcBuf_CNG[CnIdx] * Zc;
|
||||
|
||||
moveBricks_circ((int8_t *)&p_bnProcBuf[idxBn], lane * 4, BricksToBeMoved, Zc, lut_circShift_CNG[CnIdx], INVERSE, PUT_BRICKS);
|
||||
}
|
||||
|
||||
__device__ void cnProcKernel_int8_G7(const t_nrLDPC_lut *p_lut,
|
||||
const int8_t *__restrict__ d_cnBufAll,
|
||||
int8_t *__restrict__ d_cnOutAll,
|
||||
int8_t *__restrict__ d_bnBufAll,
|
||||
int tid,
|
||||
uint8_t groupId,
|
||||
uint8_t CnIdx,
|
||||
int Zc )
|
||||
{
|
||||
const uint8_t NUM = 7; // Gn = 7
|
||||
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll; // output pointer each block tackle with
|
||||
|
||||
const int8_t *p_bnProcBuf = (const int8_t *)d_bnBufAll;
|
||||
|
||||
if (tid >= NUM * Zc / 4)
|
||||
return;
|
||||
|
||||
const uint row = tid / 96;
|
||||
const uint lane = tid % 96;
|
||||
// 5 * 384 / 4 = 480
|
||||
const uint16_t c_lut_idxG7[7][6] = {
|
||||
|
||||
{480, 960, 1440, 1920, 2400, 2880},
|
||||
{0, 960, 1440, 1920, 2400, 2880},
|
||||
{0, 480, 1440, 1920, 2400, 2880},
|
||||
{0, 480, 960, 1920, 2400, 2880},
|
||||
{0, 480, 960, 1440, 2400, 2880},
|
||||
{0, 480, 960, 1440, 1920, 2880},
|
||||
{0, 480, 960, 1440, 1920, 2400}};
|
||||
|
||||
const uint baseShift = 5 * Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
// const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG7[row][0] * 4);
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
//-------------------------loop starts here-------------------------------
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG7[row][1] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG7[row][2] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG7[row][3] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG7[row][4] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG7[row][5] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
//-------------------------------------------------------------------------
|
||||
min = __vminu4(min, maxLLR);
|
||||
*p_cnProcBufResBit = __vsign4(&min, &sgn); // 0x17171717;
|
||||
uint8_t *BricksToBeMoved = (uint8_t *)p_cnProcBufResBit;
|
||||
|
||||
const uint16_t *lut_circShift_CNG = arrPos(p_lut->circShift[groupId], row);
|
||||
const uint32_t *lut_startAddrBnProcBuf_CNG = arrPos(p_lut->startAddrBnProcBuf[groupId], row);
|
||||
const uint8_t *lut_bnPosBnProcBuf_CNG = arrPos(p_lut->bnPosBnProcBuf[groupId], row);
|
||||
|
||||
const int idxBn = lut_startAddrBnProcBuf_CNG[CnIdx] + lut_bnPosBnProcBuf_CNG[CnIdx] * Zc;
|
||||
|
||||
moveBricks_circ((int8_t *)&p_bnProcBuf[idxBn], lane * 4, BricksToBeMoved, Zc, lut_circShift_CNG[CnIdx], INVERSE, PUT_BRICKS);
|
||||
}
|
||||
|
||||
__device__ void cnProcKernel_int8_G8(const t_nrLDPC_lut *p_lut,
|
||||
const int8_t *__restrict__ d_cnBufAll,
|
||||
int8_t *__restrict__ d_cnOutAll,
|
||||
int8_t *__restrict__ d_bnBufAll,
|
||||
int tid,
|
||||
uint8_t groupId,
|
||||
uint8_t CnIdx,
|
||||
int Zc )
|
||||
{
|
||||
const uint8_t NUM = 8; // Gn = 8
|
||||
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll; // output pointer each block tackle with
|
||||
|
||||
const int8_t *p_bnProcBuf = (const int8_t *)d_bnBufAll;
|
||||
|
||||
if (tid >= NUM * Zc / 4)
|
||||
return;
|
||||
|
||||
const uint row = tid / 96;
|
||||
const uint lane = tid % 96;
|
||||
// 2 * 384 / 4 = 192
|
||||
const uint16_t c_lut_idxG8[8][7] = {
|
||||
|
||||
{192, 384, 576, 768, 960, 1152, 1344},
|
||||
{0, 384, 576, 768, 960, 1152, 1344},
|
||||
{0, 192, 576, 768, 960, 1152, 1344},
|
||||
{0, 192, 384, 768, 960, 1152, 1344},
|
||||
{0, 192, 384, 576, 960, 1152, 1344},
|
||||
{0, 192, 384, 576, 768, 1152, 1344},
|
||||
{0, 192, 384, 576, 768, 960, 1344},
|
||||
{0, 192, 384, 576, 768, 960, 1152}};
|
||||
const uint baseShift = 2 * Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
// const uint srcByte = lane * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG8[row][0] * 4);
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
//-------------------------loop starts here-------------------------------
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG8[row][1] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG8[row][2] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG8[row][3] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG8[row][4] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG8[row][5] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG8[row][6] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
//-------------------------------------------------------------------------
|
||||
min = __vminu4(min, maxLLR);
|
||||
*p_cnProcBufResBit = __vsign4(&min, &sgn); // 0x18181818;
|
||||
uint8_t *BricksToBeMoved = (uint8_t *)p_cnProcBufResBit;
|
||||
|
||||
const uint16_t *lut_circShift_CNG = arrPos(p_lut->circShift[groupId], row);
|
||||
const uint32_t *lut_startAddrBnProcBuf_CNG = arrPos(p_lut->startAddrBnProcBuf[groupId], row);
|
||||
const uint8_t *lut_bnPosBnProcBuf_CNG = arrPos(p_lut->bnPosBnProcBuf[groupId], row);
|
||||
|
||||
const int idxBn = lut_startAddrBnProcBuf_CNG[CnIdx] + lut_bnPosBnProcBuf_CNG[CnIdx] * Zc;
|
||||
|
||||
moveBricks_circ((int8_t *)&p_bnProcBuf[idxBn], lane * 4, BricksToBeMoved, Zc, lut_circShift_CNG[CnIdx], INVERSE, PUT_BRICKS);
|
||||
}
|
||||
|
||||
__device__ void cnProcKernel_int8_G9(const t_nrLDPC_lut *p_lut,
|
||||
const int8_t *__restrict__ d_cnBufAll,
|
||||
int8_t *__restrict__ d_cnOutAll,
|
||||
int8_t *__restrict__ d_bnBufAll,
|
||||
int tid,
|
||||
uint8_t groupId,
|
||||
uint8_t CnIdx,
|
||||
int Zc )
|
||||
{
|
||||
const uint8_t NUM = 9; // Gn = 9
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll; // output pointer each block tackle with
|
||||
|
||||
const int8_t *p_bnProcBuf = (const int8_t *)d_bnBufAll;
|
||||
|
||||
if (tid >= NUM * Zc / 4)
|
||||
return;
|
||||
/*
|
||||
if(tid == 0 && blockIdx.x == 0){
|
||||
printf("BG7 CN: p_cnProcBuf first all elements: ");
|
||||
for (int idx = 0; idx < 768; idx++)
|
||||
{
|
||||
printf("%02x ", *(&p_cnProcBuf[idx]-384));
|
||||
}
|
||||
printf("\n");
|
||||
__syncthreads();
|
||||
}*/
|
||||
|
||||
const uint row = tid / 96;
|
||||
const uint lane = tid % 96;
|
||||
// 2 * 384 / 4 = 192
|
||||
const uint16_t c_lut_idxG9[9][8] = {
|
||||
|
||||
{192, 384, 576, 768, 960, 1152, 1344, 1536},
|
||||
{0, 384, 576, 768, 960, 1152, 1344, 1536},
|
||||
{0, 192, 576, 768, 960, 1152, 1344, 1536},
|
||||
{0, 192, 384, 768, 960, 1152, 1344, 1536},
|
||||
{0, 192, 384, 576, 960, 1152, 1344, 1536},
|
||||
{0, 192, 384, 576, 768, 1152, 1344, 1536},
|
||||
{0, 192, 384, 576, 768, 960, 1344, 1536},
|
||||
{0, 192, 384, 576, 768, 960, 1152, 1536},
|
||||
{0, 192, 384, 576, 768, 960, 1152, 1344}};
|
||||
|
||||
const uint baseShift = 2 * Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
// const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG9[row][0] * 4);
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
//-------------------------loop starts here-------------------------------
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG9[row][1] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG9[row][2] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG9[row][3] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG9[row][4] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG9[row][5] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG9[row][6] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG9[row][7] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
//-------------------------------------------------------------------------
|
||||
min = __vminu4(min, maxLLR);
|
||||
*p_cnProcBufResBit = __vsign4(&min, &sgn); // 0x19191919;
|
||||
uint8_t *BricksToBeMoved = (uint8_t *)p_cnProcBufResBit;
|
||||
|
||||
const uint16_t *lut_circShift_CNG = arrPos(p_lut->circShift[groupId], row);
|
||||
const uint32_t *lut_startAddrBnProcBuf_CNG = arrPos(p_lut->startAddrBnProcBuf[groupId], row);
|
||||
const uint8_t *lut_bnPosBnProcBuf_CNG = arrPos(p_lut->bnPosBnProcBuf[groupId], row);
|
||||
|
||||
const int idxBn = lut_startAddrBnProcBuf_CNG[CnIdx] + lut_bnPosBnProcBuf_CNG[CnIdx] * Zc;
|
||||
|
||||
moveBricks_circ((int8_t *)&p_bnProcBuf[idxBn], lane * 4, BricksToBeMoved, Zc, lut_circShift_CNG[CnIdx], INVERSE, PUT_BRICKS);
|
||||
}
|
||||
|
||||
__device__ void cnProcKernel_int8_G10(const t_nrLDPC_lut *p_lut,
|
||||
const int8_t *__restrict__ d_cnBufAll,
|
||||
int8_t *__restrict__ d_cnOutAll,
|
||||
int8_t *__restrict__ d_bnBufAll,
|
||||
int tid,
|
||||
uint8_t groupId,
|
||||
uint8_t CnIdx,
|
||||
int Zc)
|
||||
{
|
||||
const uint8_t NUM = 10; // Gn = 10
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll; // output pointer each block tackle with
|
||||
|
||||
const int8_t *p_bnProcBuf = (const int8_t *)d_bnBufAll;
|
||||
|
||||
if (tid >= NUM * Zc / 4)
|
||||
return;
|
||||
|
||||
const uint row = tid / 96;
|
||||
const uint lane = tid % 96;
|
||||
// 1 * 384 / 4 = 96
|
||||
const uint16_t c_lut_idxG10[10][9] = {
|
||||
|
||||
{96, 192, 288, 384, 480, 576, 672, 768, 864},
|
||||
{0, 192, 288, 384, 480, 576, 672, 768, 864},
|
||||
{0, 96, 288, 384, 480, 576, 672, 768, 864},
|
||||
{0, 96, 192, 384, 480, 576, 672, 768, 864},
|
||||
{0, 96, 192, 288, 480, 576, 672, 768, 864},
|
||||
{0, 96, 192, 288, 384, 576, 672, 768, 864},
|
||||
{0, 96, 192, 288, 384, 480, 672, 768, 864},
|
||||
{0, 96, 192, 288, 384, 480, 576, 768, 864},
|
||||
{0, 96, 192, 288, 384, 480, 576, 672, 864},
|
||||
{0, 96, 192, 288, 384, 480, 576, 672, 768}};
|
||||
|
||||
const uint baseShift = 1 * Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
// const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][0] * 4);
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
//-------------------------loop starts here-------------------------------
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][1] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][2] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][3] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][4] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][5] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][6] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][7] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][8] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
//-------------------------------------------------------------------------
|
||||
min = __vminu4(min, maxLLR);
|
||||
*p_cnProcBufResBit = __vsign4(&min, &sgn); // 0x1a1a1a1a;
|
||||
uint8_t *BricksToBeMoved = (uint8_t *)p_cnProcBufResBit;
|
||||
|
||||
const uint16_t *lut_circShift_CNG = arrPos(p_lut->circShift[groupId], row);
|
||||
const uint32_t *lut_startAddrBnProcBuf_CNG = arrPos(p_lut->startAddrBnProcBuf[groupId], row);
|
||||
const uint8_t *lut_bnPosBnProcBuf_CNG = arrPos(p_lut->bnPosBnProcBuf[groupId], row);
|
||||
|
||||
const int idxBn = lut_startAddrBnProcBuf_CNG[CnIdx] + lut_bnPosBnProcBuf_CNG[CnIdx] * Zc;
|
||||
|
||||
moveBricks_circ((int8_t *)&p_bnProcBuf[idxBn], lane * 4, BricksToBeMoved, Zc, lut_circShift_CNG[CnIdx], INVERSE, PUT_BRICKS);
|
||||
}
|
||||
|
||||
__device__ void cnProcKernel_int8_G19(const t_nrLDPC_lut *p_lut,
|
||||
const int8_t *__restrict__ d_cnBufAll,
|
||||
int8_t *__restrict__ d_cnOutAll,
|
||||
int8_t *__restrict__ d_bnBufAll,
|
||||
int Tid,
|
||||
uint8_t groupId,
|
||||
uint8_t CnIdx,
|
||||
int Zc)
|
||||
{
|
||||
const uint8_t NUM = 19; // Gn = 19
|
||||
// Here the block 0 and block 1, block 2 and block 3, ... are doing the same thing, so we use blockIdx.x/2 to tackle this
|
||||
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll; // output pointer each block tackle with
|
||||
|
||||
const int8_t *p_bnProcBuf = (const int8_t *)d_bnBufAll;
|
||||
|
||||
int tid = Tid + 912 * (blockIdx.x % 2); // same reason, now the following no need to change
|
||||
|
||||
if (tid >= NUM * Zc / 4)
|
||||
return;
|
||||
|
||||
const uint row = tid / 96; // row = 0,1,...,18
|
||||
const uint lane = tid % 96;
|
||||
// 4 * 384 / 4 = 384
|
||||
const uint16_t c_lut_idxG19[19][18] = {
|
||||
|
||||
{384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528}};
|
||||
|
||||
const uint baseShift = 4 * Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
//// const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][0] * 4);
|
||||
// if( blockIdx.x == 45 && threadIdx.x == 1){
|
||||
// printf("tid = %d, p_cnProcBuf = %p, p_cnProcBufRes = %p, p_cnProcBufResBit = %p, first ymm0 addr = %p\n", tid, p_cnProcBuf,
|
||||
// p_cnProcBufRes, p_cnProcBufResBit, (const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][0] * 4));
|
||||
//}
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
//-------------------------loop starts here-------------------------------
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][1] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][2] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][3] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][4] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][5] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][6] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][7] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][8] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][9] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][10] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][11] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][12] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][13] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][14] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][15] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][16] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][17] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
//-------------------------------------------------------------------------
|
||||
min = __vminu4(min, maxLLR);
|
||||
*p_cnProcBufResBit = __vsign4(&min, &sgn); // 0xbcbcbcbc;
|
||||
uint8_t *BricksToBeMoved = (uint8_t *)p_cnProcBufResBit;
|
||||
|
||||
const uint16_t *lut_circShift_CNG = arrPos(p_lut->circShift[groupId], row);
|
||||
const uint32_t *lut_startAddrBnProcBuf_CNG = arrPos(p_lut->startAddrBnProcBuf[groupId], row);
|
||||
const uint8_t *lut_bnPosBnProcBuf_CNG = arrPos(p_lut->bnPosBnProcBuf[groupId], row);
|
||||
|
||||
const int idxBn = lut_startAddrBnProcBuf_CNG[CnIdx] + lut_bnPosBnProcBuf_CNG[CnIdx] * Zc;
|
||||
/*if (0) {
|
||||
printf("moveBricks_circ call:\n");
|
||||
// printf("lut_startAddrBnProcBuf_CNG = %p\n", lut_startAddrBnProcBuf_CNG);
|
||||
printf("lut_bnPosBnProcBuf_CNG = %p\n", lut_bnPosBnProcBuf_CNG);
|
||||
printf("lut_startAddrBnProcBuf_CNG[%d] = %d\n", row, lut_startAddrBnProcBuf_CNG[row]);
|
||||
printf("lut_bnPosBnProcBuf_CNG[%d] = %d\n", row, lut_bnPosBnProcBuf_CNG[row]);
|
||||
printf("idxBn = %d\n", idxBn);
|
||||
printf("dstBuf = %p\n", (int8_t *)&p_bnProcBuf[idxBn]);
|
||||
|
||||
// printf("dstBuf_Offset = %d\n", lane * 4);
|
||||
// printf("BricksToBeMoved = [%d, %d, %d, %d]\n", BricksToBeMoved[0], BricksToBeMoved[1], BricksToBeMoved[2],
|
||||
// BricksToBeMoved[3]); printf("Z = %d\n", Zc);
|
||||
printf("cshift = %d\n", lut_circShift_CNG[CnIdx]);
|
||||
// printf("inverse = %d\n", INVERSE);
|
||||
moveBricks_circ((const int8_t *)&p_bnProcBuf[idxBn], lane * 4, BricksToBeMoved, Zc, lut_circShift_CNG[CnIdx], INVERSE, tid);
|
||||
}*/
|
||||
moveBricks_circ((int8_t *)&p_bnProcBuf[idxBn], lane * 4, BricksToBeMoved, Zc, lut_circShift_CNG[CnIdx], INVERSE, PUT_BRICKS);
|
||||
}
|
||||
@@ -111,7 +111,7 @@ static inline void nrLDPC_bnProcPc(t_nrLDPC_lut* p_lut, int8_t* bnProcBuf, int8_
|
||||
|
||||
for (uint32_t cnidx=1;cnidx<NR_LDPC_NUM_BN_GROUPS_BG1_R13;cnidx++) {
|
||||
// =====================================================================
|
||||
// Process group with 2 CNs
|
||||
// Process group with more than 1 CN
|
||||
|
||||
if (lut_numBnInBnGroups[cnidx] > 0)
|
||||
{
|
||||
|
||||
@@ -112,8 +112,8 @@ static inline void nrLDPC_cnProc_BG2(t_nrLDPC_lut* p_lut, int8_t* cnProcBuf, int
|
||||
|
||||
// Store result
|
||||
min = simde_mm256_min_epu8(min, *p_maxLLR); // 128 in epi8 is -127
|
||||
//*p_cnProcBufResBit = simde_mm256_sign_epi8(min, sgn);
|
||||
//p_cnProcBufResBit++;
|
||||
// *p_cnProcBufResBit = simde_mm256_sign_epi8(min, sgn);
|
||||
// p_cnProcBufResBit++;
|
||||
p_cnProcBufResBit[i]=simde_mm256_sign_epi8(min, sgn);
|
||||
}
|
||||
}
|
||||
|
||||
900
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_cnProc_BG1_cuda_ori.cu
Normal file
900
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_cnProc_BG1_cuda_ori.cu
Normal file
@@ -0,0 +1,900 @@
|
||||
#include <cuda_runtime.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include "nrLDPC_types.h"
|
||||
|
||||
#define Q_SCALE 8.0
|
||||
#define BG1_GRP0_CN 1
|
||||
#define ZC 384 // for BG1 test only
|
||||
#define CPU_ADDRESSING 1 // 0 means copy data into gpu memory, for common gpu; 1 for grace hopper which can read cpu memory directly
|
||||
#define CUDA_STREAM 0 // 1 means use cudastream to run kernels in parallel; for grace hopper, GPU automatically run kernels in parallel
|
||||
// so 0 is enough.
|
||||
|
||||
__constant__ static uint8_t d_lut_numBnInCnGroups_BG1_R13[9];
|
||||
__constant__ static int d_lut_numThreadsEachCnGroupsNeed_BG1_R13[9];
|
||||
__constant__ static uint8_t d_lut_numCnInCnGroups_BG1_R13[9];
|
||||
|
||||
// === CUDA Error Checking ===
|
||||
// Wrap any CUDA API call with CHECK(...) to automatically print error info with file and line number
|
||||
// Example usage: CHECK(cudaMalloc(&ptr, size));
|
||||
#define CHECK(call) ErrorCheck((call), __FILE__, __LINE__)
|
||||
|
||||
/**
|
||||
* @brief Checks CUDA error status and prints detailed diagnostic info if an error occurred.
|
||||
*
|
||||
* @param error_code The CUDA error code returned from a CUDA runtime API call.
|
||||
* @param filename The name of the source file where the error occurred.
|
||||
* @param lineNumber The line number in the source file where the error occurred.
|
||||
* @return cudaError_t Returns the same error code passed in, for optional further handling.
|
||||
*/
|
||||
inline cudaError_t ErrorCheck(cudaError_t error_code, const char *filename, int lineNumber)
|
||||
{
|
||||
if (error_code != cudaSuccess) {
|
||||
printf("[CUDA ERROR] %s (%d): %s\nOccurred in file: %s at line %d\n",
|
||||
cudaGetErrorName(error_code),
|
||||
error_code,
|
||||
cudaGetErrorString(error_code),
|
||||
filename,
|
||||
lineNumber);
|
||||
}
|
||||
return error_code;
|
||||
}
|
||||
|
||||
__device__ __forceinline__ uint32_t __vxor4(const uint32_t *a, uint32_t *b)
|
||||
{
|
||||
return (*a) ^ (*b) | 0x01010101; // increase accuracy
|
||||
}
|
||||
|
||||
__device__ __forceinline__ uint32_t __vsign4(const uint32_t *a, uint32_t *b)
|
||||
{
|
||||
uint32_t mask = __vcmples4(b[0], 0); // 0xFF / 0x00 per‑byte
|
||||
uint32_t bneg = __vneg4(a[0]);
|
||||
return (mask & bneg) | (~mask & a[0]); // Compute ±magnitude in two steps
|
||||
}
|
||||
|
||||
__global__ void cnProcKernel_int8_G3(const int8_t *__restrict__ d_cnBufAll, int8_t *__restrict__ d_cnOutAll, int Zc)
|
||||
{
|
||||
const uint8_t NUM = 3; // Gn = 3
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll + blockIdx.x * Zc; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll + blockIdx.x * Zc; // output pointer each block tackle with
|
||||
int tid = threadIdx.x;
|
||||
|
||||
if (tid >= NUM * Zc / 4) // NUM * Zc / 4 is the number of threads assigned to each block
|
||||
return;
|
||||
const uint row = tid / 96; // row = 0,1,2 -> 3 BNs
|
||||
const uint lane = tid % 96; // lane = 0,1,...,95 -> one thread in one of 96 process units
|
||||
// and produce 1/96 of the Msg to one BN
|
||||
// 1*384/4 = 96
|
||||
const uint16_t c_lut_idxG3[3][2] = {{96, 192}, {0, 192}, {0, 96}};
|
||||
|
||||
const uint baseShift = Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG3[row][0] * 4);
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
// loop starts here
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG3[row][1] * 4);
|
||||
/*if(row == 0 && blockIdx.x == 0){
|
||||
printf("In thread %d, in address offset: %d, ymm0 = %02x\n", tid, lane * 4 + c_lut_idxG3[row][0], ymm0);
|
||||
}*/
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
min = __vminu4(min, maxLLR);
|
||||
uint32_t result = __vsign4(&min, &sgn);
|
||||
*p_cnProcBufResBit = result;
|
||||
}
|
||||
|
||||
__global__ void cnProcKernel_int8_G4(const int8_t *__restrict__ d_cnBufAll, int8_t *__restrict__ d_cnOutAll, int Zc)
|
||||
{
|
||||
const uint8_t NUM = 4; // Gn = 3
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll + blockIdx.x * Zc; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll + blockIdx.x * Zc; // output pointer each block tackle with
|
||||
int tid = threadIdx.x;
|
||||
// if(tid == 1){
|
||||
// printf("\nThis is block %d in G4", blockIdx.x);
|
||||
//}
|
||||
if (tid >= NUM * Zc / 4)
|
||||
return;
|
||||
|
||||
const uint row = tid / 96;
|
||||
const uint lane = tid % 96;
|
||||
// 5*384/4 = 480
|
||||
const uint16_t c_lut_idxG4[4][3] = {
|
||||
|
||||
{480, 960, 1440},
|
||||
{0, 960, 1440},
|
||||
{0, 480, 1440},
|
||||
{0, 480, 960}};
|
||||
|
||||
const uint baseShift = 5 * Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG4[row][0] * 4);
|
||||
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
//-------------------------loop starts here-------------------------------
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG4[row][1] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG4[row][2] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
min = __vminu4(min, maxLLR);
|
||||
uint32_t result = __vsign4(&min, &sgn);
|
||||
*p_cnProcBufResBit = result;
|
||||
// if(row == 0 && blockIdx.x == 0){
|
||||
// printf("In thread %d, result = %02x\n", tid, result);
|
||||
//}
|
||||
}
|
||||
|
||||
__global__ void cnProcKernel_int8_G5(const int8_t *__restrict__ d_cnBufAll, int8_t *__restrict__ d_cnOutAll, int Zc)
|
||||
{
|
||||
const uint8_t NUM = 5; // Gn = 5
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll + blockIdx.x * Zc; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll + blockIdx.x * Zc; // output pointer each block tackle with
|
||||
|
||||
int tid = threadIdx.x;
|
||||
if (tid >= NUM * Zc / 4)
|
||||
return;
|
||||
|
||||
const uint row = tid / 96;
|
||||
const uint lane = tid % 96;
|
||||
// 18 * 384 / 4 = 1728
|
||||
const uint16_t c_lut_idxG5[5][4] = {
|
||||
|
||||
{1728, 3456, 5184, 6912},
|
||||
{0, 3456, 5184, 6912},
|
||||
{0, 1728, 5184, 6912},
|
||||
{0, 1728, 3456, 6912},
|
||||
{0, 1728, 3456, 5184}};
|
||||
|
||||
const uint baseShift = 18 * Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG5[row][0] * 4);
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
//-------------------------loop starts here-------------------------------
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG5[row][1] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG5[row][2] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG5[row][3] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
//-------------------------------------------------------------------------
|
||||
min = __vminu4(min, maxLLR);
|
||||
uint32_t result = __vsign4(&min, &sgn);
|
||||
*p_cnProcBufResBit = result;
|
||||
}
|
||||
|
||||
__global__ void cnProcKernel_int8_G6(const int8_t *__restrict__ d_cnBufAll, int8_t *__restrict__ d_cnOutAll, int Zc)
|
||||
{
|
||||
const uint8_t NUM = 6; // Gn = 6
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll + blockIdx.x * Zc; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll + blockIdx.x * Zc; // output pointer each block tackle with
|
||||
|
||||
int tid = threadIdx.x;
|
||||
if (tid >= NUM * Zc / 4)
|
||||
return;
|
||||
|
||||
const uint row = tid / 96;
|
||||
const uint lane = tid % 96;
|
||||
// 8 * 384 / 4 = 768
|
||||
const uint16_t c_lut_idxG6[6][5] = {
|
||||
|
||||
{768, 1536, 2304, 3072, 3840},
|
||||
{0, 1536, 2304, 3072, 3840},
|
||||
{0, 768, 2304, 3072, 3840},
|
||||
{0, 768, 1536, 3072, 3840},
|
||||
{0, 768, 1536, 2304, 3840},
|
||||
{0, 768, 1536, 2304, 3072}};
|
||||
|
||||
const uint baseShift = 8 * Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG6[row][0] * 4);
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
//-------------------------loop starts here-------------------------------
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG6[row][1] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG6[row][2] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG6[row][3] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG6[row][4] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
//-------------------------------------------------------------------------
|
||||
min = __vminu4(min, maxLLR);
|
||||
uint32_t result = __vsign4(&min, &sgn);
|
||||
*p_cnProcBufResBit = result;
|
||||
}
|
||||
|
||||
__global__ void cnProcKernel_int8_G7(const int8_t *__restrict__ d_cnBufAll, int8_t *__restrict__ d_cnOutAll, int Zc)
|
||||
{
|
||||
const uint8_t NUM = 7; // Gn = 7
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll + blockIdx.x * Zc; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll + blockIdx.x * Zc; // output pointer each block tackle with
|
||||
|
||||
int tid = threadIdx.x;
|
||||
if (tid >= NUM * Zc / 4)
|
||||
return;
|
||||
|
||||
const uint row = tid / 96;
|
||||
const uint lane = tid % 96;
|
||||
// 5 * 384 / 4 = 480
|
||||
const uint16_t c_lut_idxG7[7][6] = {
|
||||
|
||||
{480, 960, 1440, 1920, 2400, 2880},
|
||||
{0, 960, 1440, 1920, 2400, 2880},
|
||||
{0, 480, 1440, 1920, 2400, 2880},
|
||||
{0, 480, 960, 1920, 2400, 2880},
|
||||
{0, 480, 960, 1440, 2400, 2880},
|
||||
{0, 480, 960, 1440, 1920, 2880},
|
||||
{0, 480, 960, 1440, 1920, 2400}};
|
||||
|
||||
const uint baseShift = 5 * Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG7[row][0] * 4);
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
//-------------------------loop starts here-------------------------------
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG7[row][1] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG7[row][2] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG7[row][3] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG7[row][4] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG7[row][5] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
//-------------------------------------------------------------------------
|
||||
min = __vminu4(min, maxLLR);
|
||||
uint32_t result = __vsign4(&min, &sgn);
|
||||
*p_cnProcBufResBit = result;
|
||||
}
|
||||
|
||||
__global__ void cnProcKernel_int8_G8(const int8_t *__restrict__ d_cnBufAll, int8_t *__restrict__ d_cnOutAll, int Zc)
|
||||
{
|
||||
const uint8_t NUM = 8; // Gn = 8
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll + blockIdx.x * Zc; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll + blockIdx.x * Zc; // output pointer each block tackle with
|
||||
|
||||
int tid = threadIdx.x;
|
||||
if (tid >= NUM * Zc / 4)
|
||||
return;
|
||||
|
||||
const uint row = tid / 96;
|
||||
const uint lane = tid % 96;
|
||||
// 2 * 384 / 4 = 192
|
||||
const uint16_t c_lut_idxG8[8][7] = {
|
||||
|
||||
{192, 384, 576, 768, 960, 1152, 1344},
|
||||
{0, 384, 576, 768, 960, 1152, 1344},
|
||||
{0, 192, 576, 768, 960, 1152, 1344},
|
||||
{0, 192, 384, 768, 960, 1152, 1344},
|
||||
{0, 192, 384, 576, 960, 1152, 1344},
|
||||
{0, 192, 384, 576, 768, 1152, 1344},
|
||||
{0, 192, 384, 576, 768, 960, 1344},
|
||||
{0, 192, 384, 576, 768, 960, 1152}};
|
||||
const uint baseShift = 2 * Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG8[row][0] * 4);
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
//-------------------------loop starts here-------------------------------
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG8[row][1] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG8[row][2] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG8[row][3] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG8[row][4] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG8[row][5] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG8[row][6] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
//-------------------------------------------------------------------------
|
||||
min = __vminu4(min, maxLLR);
|
||||
uint32_t result = __vsign4(&min, &sgn);
|
||||
*p_cnProcBufResBit = result;
|
||||
}
|
||||
|
||||
__global__ void cnProcKernel_int8_G9(const int8_t *__restrict__ d_cnBufAll, int8_t *__restrict__ d_cnOutAll, int Zc)
|
||||
{
|
||||
const uint8_t NUM = 9; // Gn = 9
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll + blockIdx.x * Zc; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll + blockIdx.x * Zc; // output pointer each block tackle with
|
||||
|
||||
int tid = threadIdx.x;
|
||||
if (tid >= NUM * Zc / 4)
|
||||
return;
|
||||
/*
|
||||
if(tid == 0 && blockIdx.x == 0){
|
||||
printf("BG7 CN: p_cnProcBuf first all elements: ");
|
||||
for (int idx = 0; idx < 768; idx++)
|
||||
{
|
||||
printf("%02x ", *(&p_cnProcBuf[idx]-384));
|
||||
}
|
||||
printf("\n");
|
||||
__syncthreads();
|
||||
}*/
|
||||
|
||||
const uint row = tid / 96;
|
||||
const uint lane = tid % 96;
|
||||
// 2 * 384 / 4 = 192
|
||||
const uint16_t c_lut_idxG9[9][8] = {
|
||||
|
||||
{192, 384, 576, 768, 960, 1152, 1344, 1536},
|
||||
{0, 384, 576, 768, 960, 1152, 1344, 1536},
|
||||
{0, 192, 576, 768, 960, 1152, 1344, 1536},
|
||||
{0, 192, 384, 768, 960, 1152, 1344, 1536},
|
||||
{0, 192, 384, 576, 960, 1152, 1344, 1536},
|
||||
{0, 192, 384, 576, 768, 1152, 1344, 1536},
|
||||
{0, 192, 384, 576, 768, 960, 1344, 1536},
|
||||
{0, 192, 384, 576, 768, 960, 1152, 1536},
|
||||
{0, 192, 384, 576, 768, 960, 1152, 1344}};
|
||||
|
||||
const uint baseShift = 2 * Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG9[row][0] * 4);
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
//-------------------------loop starts here-------------------------------
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG9[row][1] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG9[row][2] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG9[row][3] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG9[row][4] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG9[row][5] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG9[row][6] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG9[row][7] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
//-------------------------------------------------------------------------
|
||||
min = __vminu4(min, maxLLR);
|
||||
uint32_t result = __vsign4(&min, &sgn);
|
||||
*p_cnProcBufResBit = result;
|
||||
}
|
||||
|
||||
__global__ void cnProcKernel_int8_G10(const int8_t *__restrict__ d_cnBufAll, int8_t *__restrict__ d_cnOutAll, int Zc)
|
||||
{
|
||||
const uint8_t NUM = 10; // Gn = 10
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll + blockIdx.x * Zc; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll + blockIdx.x * Zc; // output pointer each block tackle with
|
||||
|
||||
int tid = threadIdx.x;
|
||||
if (tid >= NUM * Zc / 4)
|
||||
return;
|
||||
|
||||
const uint row = tid / 96;
|
||||
const uint lane = tid % 96;
|
||||
// 1 * 384 / 4 = 96
|
||||
const uint16_t c_lut_idxG10[10][9] = {
|
||||
|
||||
{96, 192, 288, 384, 480, 576, 672, 768, 864},
|
||||
{0, 192, 288, 384, 480, 576, 672, 768, 864},
|
||||
{0, 96, 288, 384, 480, 576, 672, 768, 864},
|
||||
{0, 96, 192, 384, 480, 576, 672, 768, 864},
|
||||
{0, 96, 192, 288, 480, 576, 672, 768, 864},
|
||||
{0, 96, 192, 288, 384, 576, 672, 768, 864},
|
||||
{0, 96, 192, 288, 384, 480, 672, 768, 864},
|
||||
{0, 96, 192, 288, 384, 480, 576, 768, 864},
|
||||
{0, 96, 192, 288, 384, 480, 576, 672, 864},
|
||||
{0, 96, 192, 288, 384, 480, 576, 672, 768}};
|
||||
|
||||
const uint baseShift = 1 * Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][0] * 4);
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
//-------------------------loop starts here-------------------------------
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][1] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][2] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][3] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][4] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][5] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][6] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][7] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG10[row][8] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
//-------------------------------------------------------------------------
|
||||
min = __vminu4(min, maxLLR);
|
||||
uint32_t result = __vsign4(&min, &sgn);
|
||||
*p_cnProcBufResBit = result;
|
||||
}
|
||||
|
||||
__global__ void cnProcKernel_int8_G19(const int8_t *__restrict__ d_cnBufAll, int8_t *__restrict__ d_cnOutAll, int Zc)
|
||||
{
|
||||
const uint8_t NUM = 19; // Gn = 19
|
||||
// Here the block 0 and block 1, block 2 and block 3, ... are doing the same thing, so we use blockIdx.x/2 to tackle this
|
||||
const int8_t *p_cnProcBuf = (const int8_t *)d_cnBufAll + (int)(blockIdx.x / 2) * Zc; // input pointer each block tackle with
|
||||
const int8_t *p_cnProcBufRes = (const int8_t *)d_cnOutAll + (int)(blockIdx.x / 2) * Zc; // output pointer each block tackle with
|
||||
|
||||
int tid = threadIdx.x + 912 * (blockIdx.x % 2); // same reason, now the following no need to change
|
||||
if (tid >= NUM * Zc / 4)
|
||||
return;
|
||||
|
||||
const uint row = tid / 96; // row = 0,1,...,18
|
||||
const uint lane = tid % 96;
|
||||
// 4 * 384 / 4 = 384
|
||||
const uint16_t c_lut_idxG19[19][18] = {
|
||||
|
||||
{384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 4224, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4608, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4992, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 5376, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5760, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 6144, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6528, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6912},
|
||||
{0, 384, 768, 1152, 1536, 1920, 2304, 2688, 3072, 3456, 3840, 4224, 4608, 4992, 5376, 5760, 6144, 6528}};
|
||||
|
||||
const uint baseShift = 4 * Zc * row; // offset pointed at different BN
|
||||
const uint destByte = baseShift + lane * 4; // offset to different part inside different BN
|
||||
const uint srcByte = tid * 4;
|
||||
const uint32_t p_ones = 0x01010101;
|
||||
const uint32_t maxLLR = 0x7F7F7F7F;
|
||||
uint32_t ymm0, sgn, min;
|
||||
uint32_t *p_cnProcBufResBit;
|
||||
p_cnProcBufResBit = (uint32_t *)(p_cnProcBufRes + destByte);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][0] * 4);
|
||||
sgn = __vxor4(&p_ones, &ymm0);
|
||||
min = __vabs4(ymm0);
|
||||
|
||||
//-------------------------loop starts here-------------------------------
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][1] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][2] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][3] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][4] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][5] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][6] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][7] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][8] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][9] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][10] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][11] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][12] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][13] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][14] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][15] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][16] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
ymm0 = *(const uint32_t *)(p_cnProcBuf + lane * 4 + c_lut_idxG19[row][17] * 4);
|
||||
min = __vminu4(min, __vabs4(ymm0));
|
||||
sgn = __vxor4(&sgn, &ymm0);
|
||||
//-------------------------------------------------------------------------
|
||||
min = __vminu4(min, maxLLR);
|
||||
uint32_t result = __vsign4(&min, &sgn);
|
||||
*p_cnProcBufResBit = result;
|
||||
}
|
||||
|
||||
void nrLDPC_cnProc_BG1_cuda_core(const t_nrLDPC_lut *p_lut, int8_t *cnProcBuf, int8_t *cnProcBufRes, int Z)
|
||||
{
|
||||
const uint8_t h_lut_numBnInCnGroups_BG1_R13[] = {3, 4, 5, 6, 7, 8, 9, 10, 19};
|
||||
const int h_lut_numThreadsEachCnGroupsNeed_BG1_R13[] = {288, 384, 480, 576, 672, 768, 864, 960, 1824};
|
||||
const uint8_t h_lut_numCnInCnGroups_BG1_R13[] = {1, 5, 18, 8, 5, 2, 2, 1, 4};
|
||||
|
||||
// const uint8_t *lut_numCnInCnGroups = (const uint8_t *)p_lut->numCnInCnGroups;
|
||||
const uint32_t *lut_startAddrCnGroups = lut_startAddrCnGroups_BG1;
|
||||
|
||||
int8_t *p_cnProcBuf;
|
||||
int8_t *p_cnProcBufRes;
|
||||
|
||||
const int numGroups = 9;
|
||||
#if !CUDA_STREAM
|
||||
// No cuda stream using
|
||||
for (int i = 0; i < numGroups; ++i) {
|
||||
p_cnProcBuf = cnProcBuf + lut_startAddrCnGroups[i];
|
||||
p_cnProcBufRes = cnProcBufRes + lut_startAddrCnGroups[i];
|
||||
// printf("\nlut_startAddrCnGroups[%d]: %d\n", i, (int)lut_startAddrCnGroups[i]);
|
||||
|
||||
// printf("In i = %d, p_cnProcBuf = %p, p_cnProcBufRes = %p", i, (void *)p_cnProcBuf, (void *)p_cnProcBufRes);
|
||||
|
||||
switch (i) {
|
||||
case 0:
|
||||
// printf("launching kernel[%d]: grid=%d, block=%d\n", i,
|
||||
// h_lut_numCnInCnGroups_BG1_R13[i],
|
||||
// h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]);
|
||||
|
||||
// print p_cnProcBuf和p_cnProcBufRes firt int8_t element
|
||||
/*printf("BG3: p_cnProcBuf first all elements: ");
|
||||
for (int idx = 0; idx < 1152; idx++)
|
||||
{
|
||||
printf("%x ", p_cnProcBuf[idx]);
|
||||
}*/
|
||||
// printf("\n");
|
||||
|
||||
// cudaPointerAttributes attr;
|
||||
// cudaPointerGetAttributes(&attr, p_cnProcBuf);
|
||||
// printf("p_cnProcBuf is on %s memory\n", attr.type == cudaMemoryTypeDevice ? "device" : "host");
|
||||
cnProcKernel_int8_G3<<<h_lut_numCnInCnGroups_BG1_R13[i], h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]>>>(p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
|
||||
CHECK(cudaGetLastError());
|
||||
// cudaDeviceSynchronize();
|
||||
/*
|
||||
printf("p_cnProcBufRes first 10 elements: ");
|
||||
for (int idx = 0; idx < 1152; idx++)
|
||||
{
|
||||
printf("%d ", p_cnProcBufRes[idx]);
|
||||
}
|
||||
printf("\n");*/
|
||||
|
||||
break;
|
||||
case 1:
|
||||
// printf("launching kernel[%d]: grid=%d, block=%d\n", i,
|
||||
// h_lut_numCnInCnGroups_BG1_R13[i],
|
||||
// h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]);
|
||||
cnProcKernel_int8_G4<<<h_lut_numCnInCnGroups_BG1_R13[i], h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]>>>(p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
CHECK(cudaGetLastError());
|
||||
// cudaDeviceSynchronize();
|
||||
break;
|
||||
case 2:
|
||||
// printf("launching kernel[%d]: grid=%d, block=%d\n", i,
|
||||
// h_lut_numCnInCnGroups_BG1_R13[i],
|
||||
// h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]);
|
||||
cnProcKernel_int8_G5<<<h_lut_numCnInCnGroups_BG1_R13[i], h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]>>>(p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
CHECK(cudaGetLastError());
|
||||
// cudaDeviceSynchronize();
|
||||
break;
|
||||
case 3:
|
||||
//("launching kernel[%d]: grid=%d, block=%d\n", i,
|
||||
// h_lut_numCnInCnGroups_BG1_R13[i],
|
||||
// h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]);
|
||||
cnProcKernel_int8_G6<<<h_lut_numCnInCnGroups_BG1_R13[i], h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]>>>(p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
CHECK(cudaGetLastError());
|
||||
// cudaDeviceSynchronize();
|
||||
break;
|
||||
case 4:
|
||||
// printf("launching kernel[%d]: grid=%d, block=%d\n", i,
|
||||
// h_lut_numCnInCnGroups_BG1_R13[i],
|
||||
// h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]);
|
||||
cnProcKernel_int8_G7<<<h_lut_numCnInCnGroups_BG1_R13[i], h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]>>>(p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
CHECK(cudaGetLastError());
|
||||
// cudaDeviceSynchronize();
|
||||
break;
|
||||
case 5:
|
||||
// printf("launching kernel[%d]: grid=%d, block=%d\n", i,
|
||||
// h_lut_numCnInCnGroups_BG1_R13[i],
|
||||
// h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]);
|
||||
cnProcKernel_int8_G8<<<h_lut_numCnInCnGroups_BG1_R13[i], h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]>>>(p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
CHECK(cudaGetLastError());
|
||||
// cudaDeviceSynchronize();
|
||||
break;
|
||||
case 6:
|
||||
// printf("launching kernel[%d]: grid=%d, block=%d\n", i,
|
||||
// h_lut_numCnInCnGroups_BG1_R13[i],
|
||||
// h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]);
|
||||
cnProcKernel_int8_G9<<<h_lut_numCnInCnGroups_BG1_R13[i], h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]>>>(p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
CHECK(cudaGetLastError());
|
||||
// cudaDeviceSynchronize();
|
||||
break;
|
||||
case 7:
|
||||
// printf("launching kernel[%d]: grid=%d, block=%d\n", i,
|
||||
// h_lut_numCnInCnGroups_BG1_R13[i],
|
||||
// h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]);
|
||||
cnProcKernel_int8_G10<<<h_lut_numCnInCnGroups_BG1_R13[i], h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]>>>(p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
/*printf("BG3: p_cnProcBuf first all elements: ");
|
||||
for (int idx = 0; idx < 1152; idx++)
|
||||
{
|
||||
printf("%x ", p_cnProcBuf[idx]);
|
||||
}
|
||||
printf("\n");*/
|
||||
CHECK(cudaGetLastError());
|
||||
// cudaDeviceSynchronize();
|
||||
break;
|
||||
case 8:
|
||||
// printf("launching kernel[%d]: grid=%d, block=%d\n", i,
|
||||
// h_lut_numCnInCnGroups_BG1_R13[i],
|
||||
// h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i]);
|
||||
// Group 19: split into 2x blocks, half threads
|
||||
cnProcKernel_int8_G19<<<h_lut_numCnInCnGroups_BG1_R13[i] * 2, h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i] / 2>>>(
|
||||
p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
CHECK(cudaGetLastError());
|
||||
// cudaDeviceSynchronize();
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
// Create CUDA streams for concurrent kernel execution
|
||||
cudaStream_t streams[numGroups];
|
||||
for (int i = 0; i < numGroups; ++i) {
|
||||
cudaStreamCreate(&streams[i]);
|
||||
}
|
||||
|
||||
// Launch each group kernel on a separate stream
|
||||
for (int i = 0; i < numGroups; ++i) {
|
||||
p_cnProcBuf = &cnProcBuf[lut_startAddrCnGroups[i]];
|
||||
p_cnProcBufRes = &cnProcBufRes[lut_startAddrCnGroups[i]];
|
||||
|
||||
switch (i) {
|
||||
case 0:
|
||||
cnProcKernel_int8_G3<<<h_lut_numCnInCnGroups_BG1_R13[i], h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i], 0, streams[i]>>>(
|
||||
p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
break;
|
||||
case 1:
|
||||
cnProcKernel_int8_G4<<<h_lut_numCnInCnGroups_BG1_R13[i], h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i], 0, streams[i]>>>(
|
||||
p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
break;
|
||||
case 2:
|
||||
cnProcKernel_int8_G5<<<h_lut_numCnInCnGroups_BG1_R13[i], h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i], 0, streams[i]>>>(
|
||||
p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
break;
|
||||
case 3:
|
||||
cnProcKernel_int8_G6<<<h_lut_numCnInCnGroups_BG1_R13[i], h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i], 0, streams[i]>>>(
|
||||
p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
break;
|
||||
case 4:
|
||||
cnProcKernel_int8_G7<<<h_lut_numCnInCnGroups_BG1_R13[i], h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i], 0, streams[i]>>>(
|
||||
p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
break;
|
||||
case 5:
|
||||
cnProcKernel_int8_G8<<<h_lut_numCnInCnGroups_BG1_R13[i], h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i], 0, streams[i]>>>(
|
||||
p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
break;
|
||||
case 6:
|
||||
cnProcKernel_int8_G9<<<h_lut_numCnInCnGroups_BG1_R13[i], h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i], 0, streams[i]>>>(
|
||||
p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
break;
|
||||
case 7:
|
||||
cnProcKernel_int8_G10<<<h_lut_numCnInCnGroups_BG1_R13[i], h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i], 0, streams[i]>>>(
|
||||
p_cnProcBuf,
|
||||
p_cnProcBufRes,
|
||||
Z);
|
||||
break;
|
||||
case 8:
|
||||
// Group 19 requires more than 1024 threads, so split into 2x blocks, half threads
|
||||
cnProcKernel_int8_G19<<<h_lut_numCnInCnGroups_BG1_R13[i] * 2,
|
||||
h_lut_numThreadsEachCnGroupsNeed_BG1_R13[i] / 2,
|
||||
0,
|
||||
streams[i]>>>(p_cnProcBuf, p_cnProcBufRes, Z);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Wait for all streams to finish
|
||||
for (int i = 0; i < numGroups; ++i) {
|
||||
cudaStreamSynchronize(streams[i]);
|
||||
cudaStreamDestroy(streams[i]); // Release stream resources
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// CHECK(cudaGetLastError());
|
||||
CHECK(cudaDeviceSynchronize());
|
||||
}
|
||||
|
||||
// CUDA wrapper function: external interface identical to the original C version
|
||||
extern "C" void nrLDPC_cnProc_BG1_cuda(const t_nrLDPC_lut *p_lut, int8_t *cnProcBuf, int8_t *cnProcBufRes, uint16_t Z)
|
||||
{
|
||||
// printf("CPU_ADDRESSING: %d\n", CPU_ADDRESSING);
|
||||
#if CPU_ADDRESSING
|
||||
nrLDPC_cnProc_BG1_cuda_core(p_lut, cnProcBuf, cnProcBufRes, (int)Z);
|
||||
|
||||
#else
|
||||
// printf("Here CPU_ADDRESSING: %d\n", CPU_ADDRESSING);
|
||||
size_t cnProcBuf_size = 200000 /* buffer size for cnProcBuf */;
|
||||
size_t cnProcBufRes_size = 200000 /* buffer size for cnProcBufRes */;
|
||||
|
||||
// use Unified Memory
|
||||
int8_t *d_cnProcBuf = nullptr;
|
||||
int8_t *d_cnProcBufRes = nullptr;
|
||||
|
||||
cudaError_t err;
|
||||
|
||||
// ask for unified memory
|
||||
err = cudaMallocManaged(&d_cnProcBuf, cnProcBuf_size);
|
||||
if (err != cudaSuccess) {
|
||||
printf("cudaMallocManaged d_cnProcBuf failed: %s\n", cudaGetErrorString(err));
|
||||
return;
|
||||
} else {
|
||||
// printf("cudaMallocManaged d_cnProcBuf success, d_cnProcBuf = %p\n", (void *)d_cnProcBuf);
|
||||
}
|
||||
|
||||
err = cudaMallocManaged(&d_cnProcBufRes, cnProcBufRes_size);
|
||||
if (err != cudaSuccess) {
|
||||
printf("cudaMallocManaged d_cnProcBufRes failed: %s\n", cudaGetErrorString(err));
|
||||
cudaFree(d_cnProcBuf);
|
||||
return;
|
||||
} else {
|
||||
// printf("cudaMallocManaged d_cnProcBufRes success, d_cnProcBufRes = %p\n", (void *)d_cnProcBufRes);
|
||||
}
|
||||
|
||||
//
|
||||
memcpy(d_cnProcBuf, cnProcBuf, cnProcBuf_size);
|
||||
memset(d_cnProcBufRes, 0, cnProcBufRes_size);
|
||||
|
||||
// kernel function
|
||||
nrLDPC_cnProc_BG1_cuda_core(p_lut, d_cnProcBuf, d_cnProcBufRes, (int)Z);
|
||||
|
||||
memcpy(cnProcBufRes, d_cnProcBufRes, cnProcBufRes_size);
|
||||
|
||||
// free memory
|
||||
cudaFree(d_cnProcBuf);
|
||||
cudaFree(d_cnProcBufRes);
|
||||
#endif
|
||||
// cudaPointerAttributes attr;
|
||||
// cudaPointerGetAttributes(&attr, d_cnProcBuf);
|
||||
// printf("d_cnProcBuf is on %s memory\n", attr.type == cudaMemoryTypeDevice ? "device" : "host");
|
||||
cudaDeviceSynchronize();
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
1891
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_BG1_cuda.cu
Normal file
1891
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_BG1_cuda.cu
Normal file
File diff suppressed because it is too large
Load Diff
785
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_cuda.c
Normal file
785
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_cuda.c
Normal file
@@ -0,0 +1,785 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*!\file nrLDPC_decoder.c
|
||||
* \brief Defines thenrLDPC decoder
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include "nrLDPCdecoder_defs.h"
|
||||
#include "nrLDPC_types.h"
|
||||
#include "nrLDPC_init.h"
|
||||
#include "nrLDPC_mPass.h"
|
||||
#include "nrLDPC_cnProc.h"
|
||||
#include "nrLDPC_bnProc.h"
|
||||
#include "openair1/PHY/CODING/coding_defs.h"
|
||||
#define UNROLL_CN_PROC 1
|
||||
#define UNROLL_BN_PROC 1
|
||||
#define UNROLL_BN_PROC_PC 1
|
||||
#define UNROLL_BN2CN_PROC 1
|
||||
/*----------------------------------------------------------------------
|
||||
| cn processing files -->AVX512
|
||||
/----------------------------------------------------------------------*/
|
||||
|
||||
// BG1-------------------------------------------------------------------
|
||||
#if defined(__AVX512BW__)
|
||||
|
||||
#include "cnProc_avx512/nrLDPC_cnProc_BG1_R13_AVX512.h"
|
||||
#include "cnProc_avx512/nrLDPC_cnProc_BG1_R23_AVX512.h"
|
||||
#include "cnProc_avx512/nrLDPC_cnProc_BG1_R89_AVX512.h"
|
||||
// BG2-------------------------------------------------------------------
|
||||
#include "cnProc_avx512/nrLDPC_cnProc_BG2_R15_AVX512.h"
|
||||
#include "cnProc_avx512/nrLDPC_cnProc_BG2_R13_AVX512.h"
|
||||
#include "cnProc_avx512/nrLDPC_cnProc_BG2_R23_AVX512.h"
|
||||
|
||||
#elif defined(__AVX2__)
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
| cn Processing files -->AVX2
|
||||
/----------------------------------------------------------------------*/
|
||||
|
||||
// BG1------------------------------------------------------------------
|
||||
#include "cnProc/nrLDPC_cnProc_BG1_R13_AVX2.h"
|
||||
#include "cnProc/nrLDPC_cnProc_BG1_R23_AVX2.h"
|
||||
#include "cnProc/nrLDPC_cnProc_BG1_R89_AVX2.h"
|
||||
// BG2 --------------------------------------------------------------------
|
||||
#include "cnProc/nrLDPC_cnProc_BG2_R15_AVX2.h"
|
||||
#include "cnProc/nrLDPC_cnProc_BG2_R13_AVX2.h"
|
||||
#include "cnProc/nrLDPC_cnProc_BG2_R23_AVX2.h"
|
||||
|
||||
#else
|
||||
|
||||
// BG1------------------------------------------------------------------
|
||||
#include "cnProc128/nrLDPC_cnProc_BG1_R13_128.h"
|
||||
#include "cnProc128/nrLDPC_cnProc_BG1_R23_128.h"
|
||||
#include "cnProc128/nrLDPC_cnProc_BG1_R89_128.h"
|
||||
// BG2 --------------------------------------------------------------------
|
||||
#include "cnProc128/nrLDPC_cnProc_BG2_R15_128.h"
|
||||
#include "cnProc128/nrLDPC_cnProc_BG2_R13_128.h"
|
||||
#include "cnProc128/nrLDPC_cnProc_BG2_R23_128.h"
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
| bn Processing files -->AVX2
|
||||
/----------------------------------------------------------------------*/
|
||||
|
||||
// bnProcPc-------------------------------------------------------------
|
||||
#ifdef __AVX2__
|
||||
// BG1------------------------------------------------------------------
|
||||
#include "bnProcPc/nrLDPC_bnProcPc_BG1_R13_AVX2.h"
|
||||
#include "bnProcPc/nrLDPC_bnProcPc_BG1_R23_AVX2.h"
|
||||
#include "bnProcPc/nrLDPC_bnProcPc_BG1_R89_AVX2.h"
|
||||
// BG2 --------------------------------------------------------------------
|
||||
#include "bnProcPc/nrLDPC_bnProcPc_BG2_R15_AVX2.h"
|
||||
#include "bnProcPc/nrLDPC_bnProcPc_BG2_R13_AVX2.h"
|
||||
#include "bnProcPc/nrLDPC_bnProcPc_BG2_R23_AVX2.h"
|
||||
#else
|
||||
#include "bnProcPc128/nrLDPC_bnProcPc_BG1_R13_128.h"
|
||||
#include "bnProcPc128/nrLDPC_bnProcPc_BG1_R23_128.h"
|
||||
#include "bnProcPc128/nrLDPC_bnProcPc_BG1_R89_128.h"
|
||||
#include "bnProcPc128/nrLDPC_bnProcPc_BG2_R15_128.h"
|
||||
#include "bnProcPc128/nrLDPC_bnProcPc_BG2_R13_128.h"
|
||||
#include "bnProcPc128/nrLDPC_bnProcPc_BG2_R23_128.h"
|
||||
#endif
|
||||
|
||||
// bnProc----------------------------------------------------------------
|
||||
|
||||
#if defined(__AVX512BW__)
|
||||
// BG1-------------------------------------------------------------------
|
||||
#include "bnProc_avx512/nrLDPC_bnProc_BG1_R13_AVX512.h"
|
||||
#include "bnProc_avx512/nrLDPC_bnProc_BG1_R23_AVX512.h"
|
||||
#include "bnProc_avx512/nrLDPC_bnProc_BG1_R89_AVX512.h"
|
||||
// BG2 --------------------------------------------------------------------
|
||||
#include "bnProc_avx512/nrLDPC_bnProc_BG2_R15_AVX512.h"
|
||||
#include "bnProc_avx512/nrLDPC_bnProc_BG2_R13_AVX512.h"
|
||||
#include "bnProc_avx512/nrLDPC_bnProc_BG2_R23_AVX512.h"
|
||||
|
||||
#elif defined(__AVX2__)
|
||||
#include "bnProc/nrLDPC_bnProc_BG1_R13_AVX2.h"
|
||||
#include "bnProc/nrLDPC_bnProc_BG1_R23_AVX2.h"
|
||||
#include "bnProc/nrLDPC_bnProc_BG1_R89_AVX2.h"
|
||||
// BG2 --------------------------------------------------------------------
|
||||
#include "bnProc/nrLDPC_bnProc_BG2_R15_AVX2.h"
|
||||
#include "bnProc/nrLDPC_bnProc_BG2_R13_AVX2.h"
|
||||
#include "bnProc/nrLDPC_bnProc_BG2_R23_AVX2.h"
|
||||
#else
|
||||
#include "bnProc128/nrLDPC_bnProc_BG1_R13_128.h"
|
||||
#include "bnProc128/nrLDPC_bnProc_BG1_R23_128.h"
|
||||
#include "bnProc128/nrLDPC_bnProc_BG1_R89_128.h"
|
||||
// BG2 --------------------------------------------------------------------
|
||||
#include "bnProc128/nrLDPC_bnProc_BG2_R15_128.h"
|
||||
#include "bnProc128/nrLDPC_bnProc_BG2_R13_128.h"
|
||||
#include "bnProc128/nrLDPC_bnProc_BG2_R23_128.h"
|
||||
#endif
|
||||
|
||||
// #define NR_LDPC_PROFILER_DETAIL(a) a
|
||||
#define NR_LDPC_PROFILER_DETAIL(a)
|
||||
|
||||
#include "openair1/PHY/CODING/nrLDPC_extern.h"
|
||||
|
||||
#ifdef NR_LDPC_DEBUG_MODE
|
||||
#include "nrLDPC_tools/nrLDPC_debug.h"
|
||||
#endif
|
||||
|
||||
// decoder interface
|
||||
/**
|
||||
\brief LDPC decoder API type definition
|
||||
\param p_decParams LDPC decoder parameters
|
||||
\param p_llr Input LLRs
|
||||
\param p_llrOut Output vector
|
||||
\param p_profiler LDPC profiler statistics
|
||||
*/
|
||||
|
||||
//--------------------------CUDA Area---------------------------
|
||||
|
||||
#define STATIC_LUT 1
|
||||
|
||||
#if STATIC_LUT
|
||||
static bool p_lutCreated = false;
|
||||
static uint32_t numLLR;
|
||||
static t_nrLDPC_lut lut;
|
||||
static t_nrLDPC_lut* p_lut = &lut;
|
||||
#endif
|
||||
|
||||
#if USE_CUDA
|
||||
#include <cuda_runtime.h>
|
||||
#endif
|
||||
|
||||
#if PARALLEL_STREAM
|
||||
#define COPY_ARR_MEMBER(member, type, groups) do { \
|
||||
for (int i = 0; i < (groups); i++) { \
|
||||
type* tmp_dev; \
|
||||
if (h_lut->member[i].d != NULL && h_lut->member[i].dim1 > 0 && h_lut->member[i].dim2 > 0) { \
|
||||
size_t sz = h_lut->member[i].dim1 * h_lut->member[i].dim2 * sizeof(type); \
|
||||
err = cudaMalloc((void**)&tmp_dev, sz); \
|
||||
if (err != cudaSuccess) { \
|
||||
fprintf(stderr, "cudaMalloc failed for " #member "[%d]: %s\n", i, cudaGetErrorString(err)); \
|
||||
exit(EXIT_FAILURE); \
|
||||
} \
|
||||
cudaMemcpy(tmp_dev, h_lut->member[i].d, sz, cudaMemcpyHostToDevice); \
|
||||
/* updtae d_lut->member[i].d pointer */ \
|
||||
cudaMemcpy(&(d_lut->member[i].d), &tmp_dev, sizeof(type*), cudaMemcpyHostToDevice); \
|
||||
/* copy dim1 and dim2 */ \
|
||||
cudaMemcpy(&(d_lut->member[i].dim1), &(h_lut->member[i].dim1), sizeof(int), cudaMemcpyHostToDevice); \
|
||||
cudaMemcpy(&(d_lut->member[i].dim2), &(h_lut->member[i].dim2), sizeof(int), cudaMemcpyHostToDevice); \
|
||||
} \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define COPY_POINTER_MEMBER(member, type, count) do { \
|
||||
type* tmp_dev; \
|
||||
printf("tmp_dev = %p\n", (void*)tmp_dev);\
|
||||
err = cudaMalloc((void**)&tmp_dev, (count) * sizeof(type)); \
|
||||
printf("malloc tmp_dev = %p\n", (void*)tmp_dev);\
|
||||
if (err != cudaSuccess) { \
|
||||
fprintf(stderr, "cudaMalloc failed for " #member ": %s\n", cudaGetErrorString(err)); \
|
||||
exit(EXIT_FAILURE); \
|
||||
} \
|
||||
printf("h_lut->member = %p\n", (void*)h_lut->member);\
|
||||
cudaMemcpy(tmp_dev, h_lut->member, (count) * sizeof(type), cudaMemcpyHostToDevice); \
|
||||
printf("d_lut->member");\
|
||||
printf(" = %p\n", (void*)d_lut->member);\
|
||||
cudaMemcpy(&(d_lut->member), &tmp_dev, sizeof(type*), cudaMemcpyHostToDevice); \
|
||||
} while(0)
|
||||
|
||||
#include "decoder_graphs.h"
|
||||
static cudaStream_t decoderStreams[MAX_NUM_DLSCH_SEGMENTS];
|
||||
static cudaEvent_t decoderDoneEvents[MAX_NUM_DLSCH_SEGMENTS];
|
||||
static bool streamsCreated = false;
|
||||
static bool d_mem_exist = false;
|
||||
static int currentStreamCount = 0;
|
||||
static int8_t* iter_ptr_array;//size of [MAX_NUM_DLSCH_SEGMENTS];
|
||||
static int* PC_Flag_array;// size of[MAX_NUM_DLSCH_SEGMENTS];
|
||||
t_nrLDPC_lut* p_lut_dev = NULL;
|
||||
static t_nrLDPC_lut* P_lut = NULL;
|
||||
|
||||
// device buffers (allocated in LDPCinit)
|
||||
static int8_t* d_cnProcBuf = NULL;
|
||||
static int8_t* d_cnProcBufRes = NULL;
|
||||
static int8_t* d_bnProcBuf = NULL;
|
||||
static int8_t* d_bnProcBufRes = NULL;
|
||||
static int8_t* d_llrRes = NULL;
|
||||
static int8_t* d_llrProcBuf = NULL;
|
||||
static int8_t* d_llrOut = NULL;
|
||||
static int8_t* d_out = NULL; // optional if needed per-seg
|
||||
int gpuDeviceId;
|
||||
#endif
|
||||
|
||||
extern void nrLDPC_cnProc_BG1_cuda(const t_nrLDPC_lut* p_lut,
|
||||
int8_t* cnProcBuf,
|
||||
int8_t* cnProcBufRes,
|
||||
int8_t* bnProcBuf,
|
||||
uint16_t Z);
|
||||
|
||||
extern void nrLDPC_bnProc_BG1_cuda(const t_nrLDPC_lut* p_lut,
|
||||
int8_t* bnProcBuf,
|
||||
int8_t* bnProcBufRes,
|
||||
int8_t* llrProcBuf,
|
||||
int8_t* llrRes,
|
||||
uint16_t Z);
|
||||
|
||||
extern void nrLDPC_BnToCnPC_BG1_cuda(const t_nrLDPC_lut* p_lut,
|
||||
int8_t* bnProcBufRes,
|
||||
int8_t* cnProcBuf,
|
||||
int8_t* cnProcBufRes,
|
||||
int8_t* bnProcBuf,
|
||||
uint16_t Z,
|
||||
int* PC_Flag);
|
||||
#ifdef PARALLEL_STREAM
|
||||
extern void run_test_kernel();
|
||||
|
||||
extern void nrLDPC_decoder_scheduler_BG1_cuda_core(const t_nrLDPC_lut* p_lut,
|
||||
int8_t* p_out,
|
||||
uint32_t numLLR,
|
||||
int8_t* cnProcBuf,
|
||||
int8_t* cnProcBufRes,
|
||||
int8_t* bnProcBuf,
|
||||
int8_t* bnProcBufRes,
|
||||
int8_t* llrRes,
|
||||
int8_t* llrProcBuf,
|
||||
int8_t* llrOut,
|
||||
int8_t* p_llrOut,
|
||||
int Z,
|
||||
uint8_t BG,
|
||||
uint8_t R,
|
||||
uint8_t numMaxIter,
|
||||
e_nrLDPC_outMode outMode,
|
||||
cudaStream_t* streams,
|
||||
uint8_t CudaStreamIdx,
|
||||
cudaEvent_t* doneEvent,
|
||||
int8_t* iter_ptr,
|
||||
int* PC_Flag);
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
//-------------------------Debug Function-----------------------
|
||||
void dump_cnProcBufRes_to_file(const int8_t* cnProcBufRes, const char* filename)
|
||||
{
|
||||
FILE* fp = fopen(filename, "w");
|
||||
if (fp == NULL) {
|
||||
perror("Failed to open dump file");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
// printf("\nNR_LDPC_SIZE_CN_PROC_BUF: %d\n", NR_LDPC_SIZE_CN_PROC_BUF);
|
||||
|
||||
for (int i = 0; i < NR_LDPC_SIZE_CN_PROC_BUF; i++) {
|
||||
fprintf(fp, "%02x ", (uint8_t)cnProcBufRes[i]);
|
||||
if ((i + 1) % 16 == 0)
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
void check_lut_pointers(const t_nrLDPC_lut* lut) {
|
||||
if (!lut) {
|
||||
printf("check_lut_pointers: lut is NULL\n");
|
||||
return;
|
||||
}
|
||||
|
||||
printf("Checking LUT pointers:\n");
|
||||
printf("startAddrCnGroups = %p\n", (void*)lut->startAddrCnGroups);
|
||||
printf("numCnInCnGroups = %p\n", (void*)lut->numCnInCnGroups);
|
||||
printf("numBnInBnGroups = %p\n", (void*)lut->numBnInBnGroups);
|
||||
printf("startAddrBnGroups = %p\n", (void*)lut->startAddrBnGroups);
|
||||
printf("startAddrBnGroupsLlr = %p\n", (void*)lut->startAddrBnGroupsLlr);
|
||||
printf("llr2llrProcBufAddr = %p\n", (void*)lut->llr2llrProcBufAddr);
|
||||
printf("llr2llrProcBufBnPos = %p\n", (void*)lut->llr2llrProcBufBnPos);
|
||||
|
||||
printf("circShift = %p\n", (void*)lut->circShift);
|
||||
printf("startAddrBnProcBuf = %p\n", (void*)lut->startAddrBnProcBuf);
|
||||
printf("bnPosBnProcBuf = %p\n", (void*)lut->bnPosBnProcBuf);
|
||||
printf("posBnInCnProcBuf = %p\n", (void*)lut->posBnInCnProcBuf);
|
||||
}
|
||||
|
||||
|
||||
void dumpASS(int8_t* cnProcBufRes, const char* filename)
|
||||
{
|
||||
FILE* fp = fopen(filename, "w");
|
||||
if (fp == NULL) {
|
||||
perror("Failed to open dump file");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
// printf("\nNR_LDPC_SIZE_CN_PROC_BUF: %d\n", NR_LDPC_SIZE_CN_PROC_BUF);
|
||||
|
||||
for (int i = 0; i < MAX_NUM_DLSCH_SEGMENTS * 68 * 384; i++) {
|
||||
fprintf(fp, "%02x ", (uint8_t)cnProcBufRes[i]);
|
||||
if ((i + 1) % 16 == 0)
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
|
||||
t_nrLDPC_lut* copy_lut_to_device(const t_nrLDPC_lut* h_lut) {
|
||||
cudaError_t err;
|
||||
t_nrLDPC_lut* d_lut;
|
||||
//printf("Inside copy 1\n");
|
||||
// malloc device end struct
|
||||
err = cudaMallocManaged((void**)&d_lut, sizeof(t_nrLDPC_lut), cudaMemAttachGlobal);
|
||||
if (err != cudaSuccess) {
|
||||
fprintf(stderr, "cudaMalloc failed for d_lut: %s\n", cudaGetErrorString(err));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
//printf("Inside copy 2\n");
|
||||
// ---------------------------
|
||||
// copy all the member pointers
|
||||
// ---------------------------
|
||||
|
||||
COPY_POINTER_MEMBER(startAddrCnGroups, uint32_t, 9);
|
||||
printf("Inside copy 3\n");
|
||||
COPY_POINTER_MEMBER(numCnInCnGroups, uint8_t, 9);
|
||||
printf("Inside copy 4\n");
|
||||
printf("host ptr = %p\n", (void*)d_lut->numBnInBnGroups);
|
||||
COPY_POINTER_MEMBER(numBnInBnGroups, uint8_t, 30);
|
||||
printf("Inside copy 5\n");
|
||||
printf("host ptr = %p\n", (void*)d_lut->startAddrBnGroups);
|
||||
printf("Inside copy 5.1\n");
|
||||
COPY_POINTER_MEMBER(startAddrBnGroups, uint32_t, 30);
|
||||
printf("Inside copy 6\n");
|
||||
COPY_POINTER_MEMBER(startAddrBnGroupsLlr, uint16_t, 30);
|
||||
printf("Inside copy 7\n");
|
||||
COPY_POINTER_MEMBER(llr2llrProcBufAddr, uint16_t, 26);
|
||||
printf("Inside copy 8\n");
|
||||
COPY_POINTER_MEMBER(llr2llrProcBufBnPos, uint8_t, 26);
|
||||
printf("Inside copy 9\n");
|
||||
// COPY_POINTER_MEMBER
|
||||
// COPY_POINTER_MEMBER(numCnInCnGroups, uint8_t, X);
|
||||
// COPY_POINTER_MEMBER(numBnInBnGroups, uint8_t, Y);
|
||||
// ...
|
||||
|
||||
// ---------------------------
|
||||
// cope with arr8_t/16_t/32_t
|
||||
// ---------------------------
|
||||
|
||||
|
||||
COPY_ARR_MEMBER(circShift,uint16_t, 9);
|
||||
COPY_ARR_MEMBER(startAddrBnProcBuf,uint32_t, 9);
|
||||
COPY_ARR_MEMBER(bnPosBnProcBuf,uint8_t, 9);
|
||||
COPY_ARR_MEMBER(posBnInCnProcBuf,uint8_t, 9);
|
||||
|
||||
return d_lut;
|
||||
}
|
||||
|
||||
|
||||
extern void check_ptr_host(const void* p, const char* name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
bool is_device_pointer(const void* p);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr,
|
||||
int8_t* p_out,
|
||||
int n_segments,
|
||||
uint32_t numLLR,
|
||||
t_nrLDPC_lut* p_lut,
|
||||
t_nrLDPC_dec_params* p_decParams,
|
||||
t_nrLDPC_time_stats* p_profiler,
|
||||
decode_abort_t* ab);
|
||||
|
||||
void free_graphs()
|
||||
{
|
||||
for (int i = 0; i < MAX_NUM_DLSCH_SEGMENTS; i++) {
|
||||
if (graphCreated[i]) {
|
||||
cudaGraphExecDestroy(decoderGraphExec[i]);
|
||||
cudaGraphDestroy(decoderGraphs[i]);
|
||||
graphCreated[i] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool check_kernel_args_for_graph(const void* p_lut, // device
|
||||
const void* p_out, // may be host or device
|
||||
const void* cnProcBuf, // device expected
|
||||
const void* cnProcBufRes, // device expected
|
||||
const void* bnProcBuf, // device expected
|
||||
const void* bnProcBufRes, // device expected
|
||||
const void* llrRes, // device expected
|
||||
const void* llrProcBuf, // device expected
|
||||
const void* llrOut, // device expected // may be host or device
|
||||
const void* iter_ptr_array, // device expected (kernel iteration state)
|
||||
const void* iter_ptr_array2, // device expected
|
||||
bool strict)
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
// check p_lut: should be dvice pointer
|
||||
if (is_device_pointer(p_lut)) {
|
||||
fprintf(stderr, "check_kernel_args_for_graph: p_lut should be HOST pointer: %p\n", p_lut);
|
||||
if (strict)
|
||||
return false;
|
||||
ok = false;
|
||||
}
|
||||
|
||||
// check all the other buffer
|
||||
const void* device_ptrs[] =
|
||||
{cnProcBuf, cnProcBufRes, bnProcBuf, bnProcBufRes, llrRes, llrProcBuf, llrOut, iter_ptr_array, iter_ptr_array2};
|
||||
const char* device_names[] = {"cnProcBuf",
|
||||
"cnProcBufRes",
|
||||
"bnProcBuf",
|
||||
"bnProcBufRes",
|
||||
"llrRes",
|
||||
"llrProcBuf",
|
||||
"llrOut",
|
||||
"iter_ptr_array",
|
||||
"iter_ptr_array2"};
|
||||
for (int i = 0; i < (int)(sizeof(device_ptrs) / sizeof(device_ptrs[0])); i++) {
|
||||
if (!is_device_pointer(device_ptrs[i])) {
|
||||
fprintf(stderr, "check_kernel_args_for_graph: %s is NOT device pointer: %p\n", device_names[i], device_ptrs[i]);
|
||||
if (strict)
|
||||
return false;
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_device_pointer(p_out)) {
|
||||
fprintf(stderr, "check_kernel_args_for_graph: p_out is NOT device pointer: %p\n", p_out);
|
||||
if (strict)
|
||||
return false;
|
||||
ok = false;
|
||||
}
|
||||
if (!is_device_pointer(d_llrOut)) {
|
||||
fprintf(stderr, "check_kernel_args_for_graph: p_llrOut is NOT device pointer: %p\n", d_llrOut);
|
||||
if (strict)
|
||||
return false;
|
||||
ok = false;
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
int32_t LDPCinit()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int32_t LDPCinit_cuda()
|
||||
{
|
||||
size_t cn_bytes = MAX_NUM_DLSCH_SEGMENTS * NR_LDPC_SIZE_CN_PROC_BUF * sizeof(int8_t);
|
||||
size_t bn_bytes = MAX_NUM_DLSCH_SEGMENTS * NR_LDPC_SIZE_BN_PROC_BUF * sizeof(int8_t);
|
||||
size_t llr_bytes = MAX_NUM_DLSCH_SEGMENTS * NR_LDPC_MAX_NUM_LLR * sizeof(int8_t);
|
||||
size_t llrOut_bytes = NR_LDPC_MAX_NUM_LLR * sizeof(int8_t);
|
||||
|
||||
cudaGetDevice(&gpuDeviceId); //get device id
|
||||
|
||||
cudaError_t err;
|
||||
err = cudaMallocManaged((void**)&d_cnProcBuf, cn_bytes, cudaMemAttachGlobal);
|
||||
if (err != cudaSuccess) {
|
||||
fprintf(stderr, "cudaMalloc d_cnProcBuf failed: %s\n", cudaGetErrorString(err));
|
||||
return -1;
|
||||
}
|
||||
err = cudaMalloc((void**)&d_cnProcBufRes, cn_bytes);
|
||||
if (err != cudaSuccess) {
|
||||
fprintf(stderr, "cudaMalloc d_cnProcBufRes failed: %s\n", cudaGetErrorString(err));
|
||||
return -1;
|
||||
}
|
||||
err = cudaMalloc((void**)&d_bnProcBuf, bn_bytes);
|
||||
if (err != cudaSuccess) {
|
||||
fprintf(stderr, "cudaMalloc d_bnProcBuf failed: %s\n", cudaGetErrorString(err));
|
||||
return -1;
|
||||
}
|
||||
err = cudaMalloc((void**)&d_bnProcBufRes, bn_bytes);
|
||||
if (err != cudaSuccess) {
|
||||
fprintf(stderr, "cudaMalloc d_bnProcBufRes failed: %s\n", cudaGetErrorString(err));
|
||||
return -1;
|
||||
}
|
||||
err = cudaMalloc((void**)&d_llrRes, llr_bytes);
|
||||
if (err != cudaSuccess) {
|
||||
fprintf(stderr, "cudaMalloc d_llrRes failed: %s\n", cudaGetErrorString(err));
|
||||
return -1;
|
||||
}
|
||||
err = cudaMallocManaged((void**)&d_llrProcBuf, llr_bytes, cudaMemAttachGlobal);
|
||||
if (err != cudaSuccess) {
|
||||
fprintf(stderr, "cudaMallocManaged d_llrProcBuf failed: %s\n", cudaGetErrorString(err));
|
||||
return -1;
|
||||
}
|
||||
err = cudaMallocManaged((void**)&iter_ptr_array, MAX_NUM_DLSCH_SEGMENTS*sizeof(int8_t), cudaMemAttachGlobal);
|
||||
if (err != cudaSuccess) {
|
||||
fprintf(stderr, "cudaMallocManaged iter_ptr_array failed: %s\n", cudaGetErrorString(err));
|
||||
return -1;
|
||||
}
|
||||
|
||||
err = cudaMallocManaged((void**)&PC_Flag_array, MAX_NUM_DLSCH_SEGMENTS*sizeof(int), cudaMemAttachGlobal);
|
||||
if (err != cudaSuccess) {
|
||||
fprintf(stderr, "cudaMallocManaged PC_Flag_array failed: %s\n", cudaGetErrorString(err));
|
||||
return -1;
|
||||
}
|
||||
err = cudaMalloc((void**)&d_llrOut, MAX_NUM_DLSCH_SEGMENTS * llrOut_bytes);
|
||||
if (err != cudaSuccess) {
|
||||
fprintf(stderr, "cudaMalloc d_pp_llrOut failed: %s\n", cudaGetErrorString(err));
|
||||
return -1;
|
||||
}
|
||||
err = cudaMalloc((void**)&d_out, 13*8448*sizeof(uint8_t));
|
||||
if (err != cudaSuccess) {
|
||||
fprintf(stderr, "cudaMalloc d_out failed: %s\n", cudaGetErrorString(err));
|
||||
return -1;
|
||||
}
|
||||
if (!streamsCreated) {
|
||||
for (int s = 0; s < MAX_NUM_DLSCH_SEGMENTS; ++s) {
|
||||
cudaStreamCreateWithFlags(&decoderStreams[s], cudaStreamNonBlocking);
|
||||
cudaEventCreate(&decoderDoneEvents[s]);
|
||||
}
|
||||
streamsCreated = true;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t LDPCshutdown()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int32_t LDPCshutdown_cuda()
|
||||
{
|
||||
if (d_cnProcBuf)
|
||||
cudaFree(d_cnProcBuf);
|
||||
if (d_cnProcBufRes)
|
||||
cudaFree(d_cnProcBufRes);
|
||||
if (d_bnProcBuf)
|
||||
cudaFree(d_bnProcBuf);
|
||||
if (d_bnProcBufRes)
|
||||
cudaFree(d_bnProcBufRes);
|
||||
if (d_llrRes)
|
||||
cudaFree(d_llrRes);
|
||||
if (d_llrProcBuf)
|
||||
cudaFree(d_llrProcBuf);
|
||||
if (d_llrOut)
|
||||
cudaFree(d_llrOut);
|
||||
if (d_out)
|
||||
cudaFree(d_out);
|
||||
|
||||
for (int s = 0; s < MAX_NUM_DLSCH_SEGMENTS; ++s) {
|
||||
if (streamsCreated) {
|
||||
cudaEventDestroy(decoderDoneEvents[s]);
|
||||
cudaStreamDestroy(decoderStreams[s]);
|
||||
}
|
||||
}
|
||||
|
||||
free_graphs();
|
||||
|
||||
streamsCreated = false;
|
||||
d_mem_exist = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t LDPCdecoder(t_nrLDPC_dec_params* p_decParams,
|
||||
uint8_t harq_pid,
|
||||
uint8_t ulsch_id,
|
||||
uint8_t C,
|
||||
int8_t* p_llr,
|
||||
int8_t* p_out,
|
||||
t_nrLDPC_time_stats* p_profiler,
|
||||
decode_abort_t* ab)
|
||||
{ // Initialize decoder core(s) with correct LUTs
|
||||
#if STATIC_LUT
|
||||
if (!p_lutCreated) {
|
||||
//P_lut = p_lut;
|
||||
printf("Start to create p_lut\n");
|
||||
numLLR = nrLDPC_init(p_decParams, p_lut);
|
||||
printf("p_lut Created\n");
|
||||
//check p_lut
|
||||
check_lut_pointers(p_lut);
|
||||
|
||||
#ifdef PARALLEL_STREAM
|
||||
printf("Start to create p_lut_dev\n");
|
||||
p_lut_dev = copy_lut_to_device(p_lut);
|
||||
printf("p_lut_dev Created\n");
|
||||
#endif
|
||||
p_lutCreated = true;
|
||||
}
|
||||
#else
|
||||
uint32_t numLLR;
|
||||
t_nrLDPC_lut lut;
|
||||
t_nrLDPC_lut* p_lut = &lut;
|
||||
#endif
|
||||
|
||||
// Launch LDPC decoder core for one segment
|
||||
int n_segments = p_decParams->n_segments;
|
||||
int numIter = nrLDPC_decoder_core(p_llr, p_out, n_segments, numLLR, p_lut, p_decParams, p_profiler, ab);
|
||||
// printf("6.1: It works here\n");
|
||||
if (numIter >= p_decParams->numMaxIter) {
|
||||
LOG_D(PHY, "set abort: %d, %d\n", numIter, p_decParams->numMaxIter);
|
||||
set_abort(ab, true);
|
||||
}
|
||||
// printf("6.2: It works here\n");
|
||||
return numIter;
|
||||
}
|
||||
|
||||
/**
|
||||
\brief PerformsnrLDPC decoding of one code block
|
||||
\param p_llr Input LLRs
|
||||
\param p_out Output vector
|
||||
\param numLLR Number of LLRs
|
||||
\param p_lut Pointer to decoder LUTs
|
||||
\param p_decParamsnrLDPC decoder parameters
|
||||
\param p_profilernrLDPC profiler statistics
|
||||
*/
|
||||
|
||||
static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr,
|
||||
int8_t* p_out,
|
||||
int n_segments,
|
||||
uint32_t numLLR,
|
||||
t_nrLDPC_lut* p_lut,
|
||||
t_nrLDPC_dec_params* p_decParams,
|
||||
t_nrLDPC_time_stats* p_profiler,
|
||||
decode_abort_t* ab)
|
||||
{
|
||||
//run_test_kernel();//just for testing
|
||||
|
||||
// printf("n_segments = %d\n", n_segments);
|
||||
uint16_t Z = p_decParams->Z;
|
||||
uint8_t BG = p_decParams->BG;
|
||||
uint8_t R = p_decParams->R; // Decoding rate: Format 15,13,... for code rates 1/5, 1/3,... */
|
||||
uint8_t numMaxIter = p_decParams->numMaxIter;
|
||||
e_nrLDPC_outMode outMode = p_decParams->outMode;
|
||||
int Kprime = p_decParams->Kprime;
|
||||
int LastTrial = p_decParams->LastTrial;
|
||||
|
||||
if (d_mem_exist == false) {
|
||||
P_lut = p_lut_dev;
|
||||
//printf("2.1\n");
|
||||
//printf("Check P_lut = %d\n", P_lut->posBnInCnProcBuf[0]);
|
||||
//printf("2.2\n");
|
||||
LDPCinit_cuda(); // allocate device memory for the first time
|
||||
//printf("2.3\n");
|
||||
d_mem_exist = true;
|
||||
}
|
||||
|
||||
//check_ptr_host(iter_ptr_array, "iter_ptr_array");
|
||||
//check_ptr_host(PC_Flag_array, "PC_Flag_array");
|
||||
|
||||
for (int s = 0; s < MAX_NUM_DLSCH_SEGMENTS; s++) {
|
||||
iter_ptr_array[s] = 0;
|
||||
PC_Flag_array[s] = 1;
|
||||
}
|
||||
cudaMemPrefetchAsync(p_lut_dev, sizeof(p_lut_dev), gpuDeviceId,0);
|
||||
cudaMemPrefetchAsync(iter_ptr_array, MAX_NUM_DLSCH_SEGMENTS*sizeof(int8_t), gpuDeviceId,0);
|
||||
cudaMemPrefetchAsync(PC_Flag_array, MAX_NUM_DLSCH_SEGMENTS*sizeof(int), gpuDeviceId,0);
|
||||
|
||||
// printf("3.2: It works here\n");
|
||||
for (int CudaStreamIdx = 0; CudaStreamIdx < n_segments; CudaStreamIdx++) {
|
||||
int8_t* pp_llr = p_llr + CudaStreamIdx * 68 * 384; // no need put it into device
|
||||
int8_t* pp_out = d_out + CudaStreamIdx * Kprime;
|
||||
//printf("2.4\n");
|
||||
// printf("Stream %d: pp_out = %p\n", CudaStreamIdx, pp_out);
|
||||
int8_t* pp_cnProcBuf = d_cnProcBuf + CudaStreamIdx * NR_LDPC_SIZE_CN_PROC_BUF;
|
||||
int8_t* pp_cnProcBufRes = d_cnProcBufRes + CudaStreamIdx * NR_LDPC_SIZE_CN_PROC_BUF;
|
||||
int8_t* pp_bnProcBuf = d_bnProcBuf + CudaStreamIdx * NR_LDPC_SIZE_BN_PROC_BUF;
|
||||
int8_t* pp_bnProcBufRes = d_bnProcBufRes + CudaStreamIdx * NR_LDPC_SIZE_BN_PROC_BUF;
|
||||
int8_t* pp_llrRes = d_llrRes + CudaStreamIdx * NR_LDPC_MAX_NUM_LLR;
|
||||
int8_t* pp_llrProcBuf = d_llrProcBuf + CudaStreamIdx * NR_LDPC_MAX_NUM_LLR;
|
||||
int8_t* pp_llrOut = d_llrOut + CudaStreamIdx * NR_LDPC_MAX_NUM_LLR;
|
||||
// printf("4: It works here\n");
|
||||
// LLR preprocessing
|
||||
// NR_LDPC_PROFILER_DETAIL(start_meas(&p_profiler->llr2llrProcBuf));
|
||||
//printf("2.5\n");
|
||||
nrLDPC_llr2llrProcBuf(p_lut, pp_llr, pp_llrProcBuf, Z, BG);
|
||||
//printf("2.51\n");
|
||||
// NR_LDPC_PROFILER_DETAIL(stop_meas(&p_profiler->llr2llrProcBuf));
|
||||
// NR_LDPC_PROFILER_DETAIL(start_meas(&p_profiler->llr2CnProcBuf));
|
||||
if (BG == 1)
|
||||
nrLDPC_llr2CnProcBuf_BG1(p_lut, pp_llr, pp_cnProcBuf, Z);
|
||||
//printf("2.6\n");}
|
||||
else
|
||||
nrLDPC_llr2CnProcBuf_BG2(p_lut, pp_llr, pp_cnProcBuf, Z);
|
||||
// NR_LDPC_PROFILER_DETAIL(stop_meas(&p_profiler->llr2CnProcBuf));
|
||||
// Call scheduler for this segment and stream
|
||||
//printf("3\n");
|
||||
int8_t* PP_llrOut = (outMode == nrLDPC_outMode_LLRINT8) ? pp_out : pp_llrOut;
|
||||
// printf("5: It works here\n");
|
||||
// Launch decoder on stream s
|
||||
|
||||
// cudaEventCreate(&decoderDoneEvents[CudaStreamIdx]);
|
||||
// printf("Launching segment %d \n",CudaStreamIdx);
|
||||
|
||||
//-------------------------check device pointer-----------------------
|
||||
/*check_kernel_args_for_graph(p_lut_dev,
|
||||
pp_out, // pointer that will be passed to kernel (可能 host)
|
||||
pp_cnProcBuf, // device expected
|
||||
pp_cnProcBufRes,
|
||||
pp_bnProcBuf,
|
||||
pp_bnProcBufRes,
|
||||
pp_llrRes,
|
||||
pp_llrProcBuf,
|
||||
pp_llrOut,
|
||||
iter_ptr_array,
|
||||
PC_Flag_array,
|
||||
false);*/
|
||||
//------------------------check area end-------------------------------
|
||||
//printf("4\n");
|
||||
cudaMemPrefetchAsync(d_cnProcBuf, NR_LDPC_SIZE_CN_PROC_BUF, gpuDeviceId, decoderStreams[CudaStreamIdx]);//fetch cn_proc_buf to GPU
|
||||
cudaMemPrefetchAsync(pp_llrProcBuf, NR_LDPC_MAX_NUM_LLR*sizeof(int8_t), gpuDeviceId, decoderStreams[CudaStreamIdx]);
|
||||
|
||||
nrLDPC_decoder_scheduler_BG1_cuda_core(p_lut_dev,
|
||||
pp_out,
|
||||
numLLR,
|
||||
pp_cnProcBuf,
|
||||
pp_cnProcBufRes,
|
||||
pp_bnProcBuf,
|
||||
pp_bnProcBufRes,
|
||||
pp_llrRes,
|
||||
pp_llrProcBuf,
|
||||
pp_llrOut,
|
||||
PP_llrOut,
|
||||
Z,
|
||||
BG,
|
||||
R,
|
||||
numMaxIter,
|
||||
outMode,
|
||||
decoderStreams,
|
||||
CudaStreamIdx,
|
||||
decoderDoneEvents,
|
||||
&iter_ptr_array[CudaStreamIdx],
|
||||
&PC_Flag_array[CudaStreamIdx]); // stream index passed in
|
||||
|
||||
// cudaEventRecord(done[CudaStreamIdx], streams[CudaStreamIdx]);
|
||||
// printf("5: It works here\n");
|
||||
}
|
||||
for (int s = 0; s < n_segments; ++s) {
|
||||
// printf("Synchronizing segment %d \n",s);
|
||||
cudaEventSynchronize(decoderDoneEvents[s]); // stop it until segment finish
|
||||
}
|
||||
cudaDeviceSynchronize();
|
||||
cudaMemcpy(p_out, d_out, 13 * Kprime * sizeof(uint8_t), cudaMemcpyDeviceToHost);
|
||||
cudaDeviceSynchronize();
|
||||
// cudaDeviceSynchronize();
|
||||
// Wait for all streams
|
||||
|
||||
if (LastTrial == 1) {
|
||||
// printf("Now is the last trial\n");
|
||||
LDPCshutdown_cuda();
|
||||
}
|
||||
// cudaDeviceSynchronize();
|
||||
// dumpASS(p_out, "Dump_Output_Stream.txt");
|
||||
// printf("6: It works here\n");
|
||||
|
||||
return numMaxIter;
|
||||
}
|
||||
434
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_cuda_GH.c
Normal file
434
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_cuda_GH.c
Normal file
@@ -0,0 +1,434 @@
|
||||
|
||||
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*!\file nrLDPC_decoder.c
|
||||
* \brief Defines thenrLDPC decoder
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include "nrLDPCdecoder_defs.h"
|
||||
#include "nrLDPC_types.h"
|
||||
#include "nrLDPC_init.h"
|
||||
#include "nrLDPC_mPass.h"
|
||||
#include "nrLDPC_cnProc.h"
|
||||
#include "nrLDPC_bnProc.h"
|
||||
#include "openair1/PHY/CODING/coding_defs.h"
|
||||
#define UNROLL_CN_PROC 1
|
||||
#define UNROLL_BN_PROC 1
|
||||
#define UNROLL_BN_PROC_PC 1
|
||||
#define UNROLL_BN2CN_PROC 1
|
||||
/*----------------------------------------------------------------------
|
||||
| cn processing files -->AVX512
|
||||
/----------------------------------------------------------------------*/
|
||||
|
||||
// BG1-------------------------------------------------------------------
|
||||
#if defined(__AVX512BW__)
|
||||
|
||||
#include "cnProc_avx512/nrLDPC_cnProc_BG1_R13_AVX512.h"
|
||||
#include "cnProc_avx512/nrLDPC_cnProc_BG1_R23_AVX512.h"
|
||||
#include "cnProc_avx512/nrLDPC_cnProc_BG1_R89_AVX512.h"
|
||||
// BG2-------------------------------------------------------------------
|
||||
#include "cnProc_avx512/nrLDPC_cnProc_BG2_R15_AVX512.h"
|
||||
#include "cnProc_avx512/nrLDPC_cnProc_BG2_R13_AVX512.h"
|
||||
#include "cnProc_avx512/nrLDPC_cnProc_BG2_R23_AVX512.h"
|
||||
|
||||
#elif defined(__AVX2__)
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
| cn Processing files -->AVX2
|
||||
/----------------------------------------------------------------------*/
|
||||
|
||||
// BG1------------------------------------------------------------------
|
||||
#include "cnProc/nrLDPC_cnProc_BG1_R13_AVX2.h"
|
||||
#include "cnProc/nrLDPC_cnProc_BG1_R23_AVX2.h"
|
||||
#include "cnProc/nrLDPC_cnProc_BG1_R89_AVX2.h"
|
||||
// BG2 --------------------------------------------------------------------
|
||||
#include "cnProc/nrLDPC_cnProc_BG2_R15_AVX2.h"
|
||||
#include "cnProc/nrLDPC_cnProc_BG2_R13_AVX2.h"
|
||||
#include "cnProc/nrLDPC_cnProc_BG2_R23_AVX2.h"
|
||||
|
||||
#else
|
||||
|
||||
// BG1------------------------------------------------------------------
|
||||
#include "cnProc128/nrLDPC_cnProc_BG1_R13_128.h"
|
||||
#include "cnProc128/nrLDPC_cnProc_BG1_R23_128.h"
|
||||
#include "cnProc128/nrLDPC_cnProc_BG1_R89_128.h"
|
||||
// BG2 --------------------------------------------------------------------
|
||||
#include "cnProc128/nrLDPC_cnProc_BG2_R15_128.h"
|
||||
#include "cnProc128/nrLDPC_cnProc_BG2_R13_128.h"
|
||||
#include "cnProc128/nrLDPC_cnProc_BG2_R23_128.h"
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
| bn Processing files -->AVX2
|
||||
/----------------------------------------------------------------------*/
|
||||
|
||||
// bnProcPc-------------------------------------------------------------
|
||||
#ifdef __AVX2__
|
||||
// BG1------------------------------------------------------------------
|
||||
#include "bnProcPc/nrLDPC_bnProcPc_BG1_R13_AVX2.h"
|
||||
#include "bnProcPc/nrLDPC_bnProcPc_BG1_R23_AVX2.h"
|
||||
#include "bnProcPc/nrLDPC_bnProcPc_BG1_R89_AVX2.h"
|
||||
// BG2 --------------------------------------------------------------------
|
||||
#include "bnProcPc/nrLDPC_bnProcPc_BG2_R15_AVX2.h"
|
||||
#include "bnProcPc/nrLDPC_bnProcPc_BG2_R13_AVX2.h"
|
||||
#include "bnProcPc/nrLDPC_bnProcPc_BG2_R23_AVX2.h"
|
||||
#else
|
||||
#include "bnProcPc128/nrLDPC_bnProcPc_BG1_R13_128.h"
|
||||
#include "bnProcPc128/nrLDPC_bnProcPc_BG1_R23_128.h"
|
||||
#include "bnProcPc128/nrLDPC_bnProcPc_BG1_R89_128.h"
|
||||
#include "bnProcPc128/nrLDPC_bnProcPc_BG2_R15_128.h"
|
||||
#include "bnProcPc128/nrLDPC_bnProcPc_BG2_R13_128.h"
|
||||
#include "bnProcPc128/nrLDPC_bnProcPc_BG2_R23_128.h"
|
||||
#endif
|
||||
|
||||
// bnProc----------------------------------------------------------------
|
||||
|
||||
#if defined(__AVX512BW__)
|
||||
// BG1-------------------------------------------------------------------
|
||||
#include "bnProc_avx512/nrLDPC_bnProc_BG1_R13_AVX512.h"
|
||||
#include "bnProc_avx512/nrLDPC_bnProc_BG1_R23_AVX512.h"
|
||||
#include "bnProc_avx512/nrLDPC_bnProc_BG1_R89_AVX512.h"
|
||||
// BG2 --------------------------------------------------------------------
|
||||
#include "bnProc_avx512/nrLDPC_bnProc_BG2_R15_AVX512.h"
|
||||
#include "bnProc_avx512/nrLDPC_bnProc_BG2_R13_AVX512.h"
|
||||
#include "bnProc_avx512/nrLDPC_bnProc_BG2_R23_AVX512.h"
|
||||
|
||||
#elif defined(__AVX2__)
|
||||
#include "bnProc/nrLDPC_bnProc_BG1_R13_AVX2.h"
|
||||
#include "bnProc/nrLDPC_bnProc_BG1_R23_AVX2.h"
|
||||
#include "bnProc/nrLDPC_bnProc_BG1_R89_AVX2.h"
|
||||
// BG2 --------------------------------------------------------------------
|
||||
#include "bnProc/nrLDPC_bnProc_BG2_R15_AVX2.h"
|
||||
#include "bnProc/nrLDPC_bnProc_BG2_R13_AVX2.h"
|
||||
#include "bnProc/nrLDPC_bnProc_BG2_R23_AVX2.h"
|
||||
#else
|
||||
#include "bnProc128/nrLDPC_bnProc_BG1_R13_128.h"
|
||||
#include "bnProc128/nrLDPC_bnProc_BG1_R23_128.h"
|
||||
#include "bnProc128/nrLDPC_bnProc_BG1_R89_128.h"
|
||||
// BG2 --------------------------------------------------------------------
|
||||
#include "bnProc128/nrLDPC_bnProc_BG2_R15_128.h"
|
||||
#include "bnProc128/nrLDPC_bnProc_BG2_R13_128.h"
|
||||
#include "bnProc128/nrLDPC_bnProc_BG2_R23_128.h"
|
||||
#endif
|
||||
|
||||
// #define NR_LDPC_PROFILER_DETAIL(a) a
|
||||
#define NR_LDPC_PROFILER_DETAIL(a)
|
||||
|
||||
#include "openair1/PHY/CODING/nrLDPC_extern.h"
|
||||
|
||||
#ifdef NR_LDPC_DEBUG_MODE
|
||||
#include "nrLDPC_tools/nrLDPC_debug.h"
|
||||
#endif
|
||||
|
||||
// decoder interface
|
||||
/**
|
||||
\brief LDPC decoder API type definition
|
||||
\param p_decParams LDPC decoder parameters
|
||||
\param p_llr Input LLRs
|
||||
\param p_llrOut Output vector
|
||||
\param p_profiler LDPC profiler statistics
|
||||
*/
|
||||
|
||||
//--------------------------CUDA Area---------------------------
|
||||
#include <cuda_runtime.h>
|
||||
|
||||
|
||||
static cudaStream_t decoderStreams[MAX_NUM_DLSCH_SEGMENTS];
|
||||
static cudaEvent_t decoderDoneEvents[MAX_NUM_DLSCH_SEGMENTS];
|
||||
static bool streamsCreated = false;
|
||||
static int currentStreamCount = 0;
|
||||
static int8_t iter_ptr_array[MAX_NUM_DLSCH_SEGMENTS];
|
||||
static int PC_Flag_array[MAX_NUM_DLSCH_SEGMENTS];
|
||||
static int8_t cnProcBuf[MAX_NUM_DLSCH_SEGMENTS * NR_LDPC_SIZE_CN_PROC_BUF] __attribute__((aligned(64))) = {0};
|
||||
static int8_t cnProcBufRes[MAX_NUM_DLSCH_SEGMENTS * NR_LDPC_SIZE_CN_PROC_BUF] __attribute__((aligned(64))) = {0};
|
||||
static int8_t bnProcBuf[MAX_NUM_DLSCH_SEGMENTS * NR_LDPC_SIZE_BN_PROC_BUF] __attribute__((aligned(64))) = {0};
|
||||
static int8_t bnProcBufRes[MAX_NUM_DLSCH_SEGMENTS * NR_LDPC_SIZE_BN_PROC_BUF] __attribute__((aligned(64))) = {0};
|
||||
static int8_t llrRes[MAX_NUM_DLSCH_SEGMENTS * NR_LDPC_MAX_NUM_LLR] __attribute__((aligned(64))) = {0};
|
||||
static int8_t llrProcBuf[MAX_NUM_DLSCH_SEGMENTS * NR_LDPC_MAX_NUM_LLR] __attribute__((aligned(64))) = {0};
|
||||
static int8_t llrOut[MAX_NUM_DLSCH_SEGMENTS * NR_LDPC_MAX_NUM_LLR] __attribute__((aligned(64))) = {0};
|
||||
|
||||
|
||||
|
||||
extern void nrLDPC_cnProc_BG1_cuda(const t_nrLDPC_lut* p_lut,
|
||||
int8_t* cnProcBuf,
|
||||
int8_t* cnProcBufRes,
|
||||
int8_t* bnProcBuf,
|
||||
uint16_t Z);
|
||||
|
||||
extern void nrLDPC_bnProc_BG1_cuda(const t_nrLDPC_lut* p_lut,
|
||||
int8_t* bnProcBuf,
|
||||
int8_t* bnProcBufRes,
|
||||
int8_t* llrProcBuf,
|
||||
int8_t* llrRes,
|
||||
uint16_t Z);
|
||||
|
||||
extern void nrLDPC_BnToCnPC_BG1_cuda(const t_nrLDPC_lut* p_lut,
|
||||
int8_t* bnProcBufRes,
|
||||
int8_t* cnProcBuf,
|
||||
int8_t* cnProcBufRes,
|
||||
int8_t* bnProcBuf,
|
||||
uint16_t Z,
|
||||
int* PC_Flag);
|
||||
|
||||
extern void nrLDPC_decoder_scheduler_BG1_cuda_core(const t_nrLDPC_lut* p_lut,
|
||||
int8_t* p_out,
|
||||
uint32_t numLLR,
|
||||
int8_t* cnProcBuf,
|
||||
int8_t* cnProcBufRes,
|
||||
int8_t* bnProcBuf,
|
||||
int8_t* bnProcBufRes,
|
||||
int8_t* llrRes,
|
||||
int8_t* llrProcBuf,
|
||||
int8_t* llrOut,
|
||||
int8_t* p_llrOut,
|
||||
int Z,
|
||||
uint8_t BG,
|
||||
uint8_t R,
|
||||
uint8_t numMaxIter,
|
||||
e_nrLDPC_outMode outMode,
|
||||
cudaStream_t* streams,
|
||||
uint8_t CudaStreamIdx,
|
||||
cudaEvent_t* doneEvent,
|
||||
int8_t* iter_ptr,
|
||||
int* PC_Flag);
|
||||
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
//-------------------------Debug Function-----------------------
|
||||
void dump_cnProcBufRes_to_file(const int8_t* cnProcBufRes, const char* filename)
|
||||
{
|
||||
FILE* fp = fopen(filename, "w");
|
||||
if (fp == NULL) {
|
||||
perror("Failed to open dump file");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
// printf("\nNR_LDPC_SIZE_CN_PROC_BUF: %d\n", NR_LDPC_SIZE_CN_PROC_BUF);
|
||||
|
||||
for (int i = 0; i < NR_LDPC_SIZE_CN_PROC_BUF; i++) {
|
||||
fprintf(fp, "%02x ", (uint8_t)cnProcBufRes[i]);
|
||||
if ((i + 1) % 16 == 0)
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
void dumpASS(int8_t* cnProcBufRes, const char* filename)
|
||||
{
|
||||
FILE* fp = fopen(filename, "w");
|
||||
if (fp == NULL) {
|
||||
perror("Failed to open dump file");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
// printf("\nNR_LDPC_SIZE_CN_PROC_BUF: %d\n", NR_LDPC_SIZE_CN_PROC_BUF);
|
||||
|
||||
for (int i = 0; i < MAX_NUM_DLSCH_SEGMENTS * 68 * 384; i++) {
|
||||
fprintf(fp, "%02x ", (uint8_t)cnProcBufRes[i]);
|
||||
if ((i + 1) % 16 == 0)
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
|
||||
static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr,
|
||||
int8_t* p_out,
|
||||
int n_segments,
|
||||
uint32_t numLLR,
|
||||
t_nrLDPC_lut* p_lut,
|
||||
t_nrLDPC_dec_params* p_decParams,
|
||||
t_nrLDPC_time_stats* p_profiler,
|
||||
decode_abort_t* ab);
|
||||
|
||||
int32_t LDPCinit()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t LDPCshutdown()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t LDPCdecoder(t_nrLDPC_dec_params* p_decParams,
|
||||
uint8_t harq_pid,
|
||||
uint8_t ulsch_id,
|
||||
uint8_t C,
|
||||
int8_t* p_llr,
|
||||
int8_t* p_out,
|
||||
t_nrLDPC_time_stats* p_profiler,
|
||||
decode_abort_t* ab)
|
||||
{
|
||||
uint32_t numLLR;
|
||||
t_nrLDPC_lut lut;
|
||||
t_nrLDPC_lut* p_lut = &lut;
|
||||
|
||||
// Initialize decoder core(s) with correct LUTs
|
||||
numLLR = nrLDPC_init(p_decParams, p_lut);
|
||||
|
||||
// Launch LDPC decoder core for one segment
|
||||
int n_segments = p_decParams->n_segments;
|
||||
int numIter = nrLDPC_decoder_core(p_llr, p_out, n_segments, numLLR, p_lut, p_decParams, p_profiler, ab);
|
||||
// printf("6.1: It works here\n");
|
||||
if (numIter >= p_decParams->numMaxIter) {
|
||||
LOG_D(PHY, "set abort: %d, %d\n", numIter, p_decParams->numMaxIter);
|
||||
set_abort(ab, true);
|
||||
}
|
||||
// printf("6.2: It works here\n");
|
||||
return numIter;
|
||||
}
|
||||
|
||||
/**
|
||||
\brief PerformsnrLDPC decoding of one code block
|
||||
\param p_llr Input LLRs
|
||||
\param p_out Output vector
|
||||
\param numLLR Number of LLRs
|
||||
\param p_lut Pointer to decoder LUTs
|
||||
\param p_decParamsnrLDPC decoder parameters
|
||||
\param p_profilernrLDPC profiler statistics
|
||||
*/
|
||||
|
||||
static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr,
|
||||
int8_t* p_out,
|
||||
int n_segments,
|
||||
uint32_t numLLR,
|
||||
t_nrLDPC_lut* p_lut,
|
||||
t_nrLDPC_dec_params* p_decParams,
|
||||
t_nrLDPC_time_stats* p_profiler,
|
||||
decode_abort_t* ab)
|
||||
{
|
||||
// printf("n_segments = %d\n", n_segments);
|
||||
uint16_t Z = p_decParams->Z;
|
||||
uint8_t BG = p_decParams->BG;
|
||||
uint8_t R = p_decParams->R; // Decoding rate: Format 15,13,... for code rates 1/5, 1/3,... */
|
||||
uint8_t numMaxIter = p_decParams->numMaxIter;
|
||||
e_nrLDPC_outMode outMode = p_decParams->outMode;
|
||||
int Kprime = p_decParams->Kprime;
|
||||
int LastTrial = p_decParams->LastTrial;
|
||||
// printf("Kprime = %d\n", Kprime);
|
||||
// int8_t* cnProcBuf= cnProcBuf;
|
||||
// int8_t* cnProcBufRes= cnProcBufRes;
|
||||
// printf("1: It works here\n");
|
||||
|
||||
|
||||
// printf("2: It works here\n");
|
||||
// Minimum number of iterations is 1
|
||||
// 0 iterations means hard-decision on input LLRs
|
||||
// Initialize with parity check fail != 0
|
||||
// printf("3: It works here\n");
|
||||
// Initialization
|
||||
//cudaStream_t streams[MAX_NUM_DLSCH_SEGMENTS];
|
||||
//cudaEvent_t done[MAX_NUM_DLSCH_SEGMENTS]; // MAX_NUM_SEGMENTS = stream num
|
||||
|
||||
for (int s = 0; s < MAX_NUM_DLSCH_SEGMENTS; s++) {
|
||||
iter_ptr_array[s] = 0;
|
||||
PC_Flag_array[s] = 1;
|
||||
}
|
||||
// printf("3.1: It works here\n");
|
||||
if (!streamsCreated) {
|
||||
for (int s = 0; s < n_segments; ++s) {
|
||||
cudaStreamCreateWithFlags(&decoderStreams[s], cudaStreamNonBlocking);
|
||||
cudaEventCreate(&decoderDoneEvents[s]);
|
||||
}
|
||||
streamsCreated = true;
|
||||
currentStreamCount = n_segments;
|
||||
}
|
||||
|
||||
// printf("3.2: It works here\n");
|
||||
for (int CudaStreamIdx = 0; CudaStreamIdx < n_segments; CudaStreamIdx++) {
|
||||
int8_t* pp_llr = p_llr + CudaStreamIdx * 68 * 384;
|
||||
int8_t* pp_out = p_out + CudaStreamIdx * Kprime;
|
||||
// printf("Stream %d: pp_out = %p\n", CudaStreamIdx, pp_out);
|
||||
int8_t* pp_cnProcBuf = cnProcBuf + CudaStreamIdx * NR_LDPC_SIZE_CN_PROC_BUF;
|
||||
int8_t* pp_cnProcBufRes = cnProcBufRes + CudaStreamIdx * NR_LDPC_SIZE_CN_PROC_BUF;
|
||||
int8_t* pp_bnProcBuf = bnProcBuf + CudaStreamIdx * NR_LDPC_SIZE_BN_PROC_BUF;
|
||||
int8_t* pp_bnProcBufRes = bnProcBufRes + CudaStreamIdx * NR_LDPC_SIZE_BN_PROC_BUF;
|
||||
int8_t* pp_llrRes = llrRes + CudaStreamIdx * NR_LDPC_MAX_NUM_LLR;
|
||||
int8_t* pp_llrProcBuf = llrProcBuf + CudaStreamIdx * NR_LDPC_MAX_NUM_LLR;
|
||||
int8_t* pp_llrOut = llrOut + CudaStreamIdx * NR_LDPC_MAX_NUM_LLR;
|
||||
// printf("4: It works here\n");
|
||||
// LLR preprocessing
|
||||
//NR_LDPC_PROFILER_DETAIL(start_meas(&p_profiler->llr2llrProcBuf));
|
||||
nrLDPC_llr2llrProcBuf(p_lut, pp_llr, pp_llrProcBuf, Z, BG);
|
||||
//NR_LDPC_PROFILER_DETAIL(stop_meas(&p_profiler->llr2llrProcBuf));
|
||||
//NR_LDPC_PROFILER_DETAIL(start_meas(&p_profiler->llr2CnProcBuf));
|
||||
if (BG == 1)
|
||||
nrLDPC_llr2CnProcBuf_BG1(p_lut, pp_llr, pp_cnProcBuf, Z);
|
||||
else
|
||||
nrLDPC_llr2CnProcBuf_BG2(p_lut, pp_llr, pp_cnProcBuf, Z);
|
||||
//NR_LDPC_PROFILER_DETAIL(stop_meas(&p_profiler->llr2CnProcBuf));
|
||||
// Call scheduler for this segment and stream
|
||||
int8_t* pp_p_llrOut = (outMode == nrLDPC_outMode_LLRINT8) ? pp_out : pp_llrOut;
|
||||
// printf("5: It works here\n");
|
||||
// Launch decoder on stream s
|
||||
|
||||
//cudaEventCreate(&decoderDoneEvents[CudaStreamIdx]);
|
||||
//printf("Launching segment %d \n",CudaStreamIdx);
|
||||
nrLDPC_decoder_scheduler_BG1_cuda_core(p_lut,
|
||||
pp_out,
|
||||
numLLR,
|
||||
pp_cnProcBuf,
|
||||
pp_cnProcBufRes,
|
||||
pp_bnProcBuf,
|
||||
pp_bnProcBufRes,
|
||||
pp_llrRes,
|
||||
pp_llrProcBuf,
|
||||
pp_llrOut,
|
||||
pp_p_llrOut,
|
||||
Z,
|
||||
BG,
|
||||
R,
|
||||
numMaxIter,
|
||||
outMode,
|
||||
decoderStreams,
|
||||
CudaStreamIdx,
|
||||
decoderDoneEvents,
|
||||
&iter_ptr_array[CudaStreamIdx],
|
||||
&PC_Flag_array[CudaStreamIdx]); // stream index passed in
|
||||
|
||||
}
|
||||
for (int s = 0; s < n_segments; ++s) {
|
||||
// printf("Synchronizing segment %d \n",s);
|
||||
cudaEventSynchronize(decoderDoneEvents[s]); // stop until segment decode
|
||||
}
|
||||
cudaDeviceSynchronize();
|
||||
|
||||
if(LastTrial == 1){
|
||||
//printf("Now is the last trial\n");
|
||||
for (int s = 0; s < n_segments; s++) {
|
||||
cudaEventDestroy(decoderDoneEvents[s]);
|
||||
cudaStreamSynchronize(decoderStreams[s]);
|
||||
cudaStreamDestroy(decoderStreams[s]);
|
||||
streamsCreated = false;
|
||||
}
|
||||
}
|
||||
//cudaDeviceSynchronize();
|
||||
// dumpASS(p_out, "Dump_Output_Stream.txt");
|
||||
// printf("6: It works here\n");
|
||||
|
||||
return numMaxIter;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -39,6 +39,7 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R)
|
||||
|
||||
char fname[FILENAME_MAX+1];
|
||||
snprintf(fname, sizeof(fname), "%s/cnProc128/nrLDPC_cnProc_BG1_R%s_128.h", dir, ratestr[R]);
|
||||
printf("%s/cnProc128/nrLDPC_cnProc_BG1_R%s_128.h\n", dir, ratestr[R]);
|
||||
FILE *fd=fopen(fname,"w");
|
||||
if (fd == NULL) {
|
||||
printf("Cannot create file %s\n", fname);
|
||||
@@ -126,20 +127,28 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R)
|
||||
fprintf(fd," for (int i=0;i<M;i++) {\n");
|
||||
// Abs and sign of 16 CNs (first BN)
|
||||
// ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][0] + i];
|
||||
fprintf(fd," ymm0 = ((simde__m128i*)cnProcBuf)[%d+i];\n",(lut_startAddrCnGroups[0]>>4)+lut_idxCnProcG3[j][0]*2);
|
||||
// sgn = simde_mm_sign_epi8(ones, ymm0);
|
||||
#ifdef AVOID_SIGN
|
||||
fprintf(fd," sgn = simde_mm_xor_si128(ones, ymm0);\n");
|
||||
// 第一个 ymm0
|
||||
fprintf(fd, " ymm0 = ((simde__m128i*)cnProcBuf)[%d+i];\n", (lut_startAddrCnGroups[0]>>4)+lut_idxCnProcG3[j][0]*2);
|
||||
/*fprintf(fd, " int8_t* dbg_ptr0 = (int8_t*)&ymm0;\n");
|
||||
fprintf(fd, " printf(\"G3 ymm0[0] @ index %%d: \", %d+i);\n", (lut_startAddrCnGroups[0]>>4)+lut_idxCnProcG3[j][0]*2);
|
||||
fprintf(fd, " for (int d=0; d<16; d++) printf(\"%%d \", dbg_ptr0[d]);\n");
|
||||
fprintf(fd, " printf(\"\\n\");\n");*/
|
||||
|
||||
#ifdef AVOID_SIGN
|
||||
fprintf(fd, " sgn = simde_mm_xor_si128(ones, ymm0);\n");
|
||||
#else
|
||||
fprintf(fd," sgn = simde_mm_sign_epi8(ones, ymm0);\n");
|
||||
fprintf(fd, " sgn = simde_mm_sign_epi8(ones, ymm0);\n");
|
||||
#endif
|
||||
// min = simde_mm_abs_epi8(ymm0);
|
||||
fprintf(fd," min = simde_mm_abs_epi8(ymm0);\n");
|
||||
|
||||
// 16 CNs of second BN
|
||||
// ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][1] + i];
|
||||
fprintf(fd," ymm0 = ((simde__m128i*)cnProcBuf)[%d+i];\n",(lut_startAddrCnGroups[0]>>4)+lut_idxCnProcG3[j][1]*2);
|
||||
|
||||
|
||||
fprintf(fd, " min = simde_mm_abs_epi8(ymm0);\n");
|
||||
|
||||
// 第二个 ymm0
|
||||
fprintf(fd, " ymm0 = ((simde__m128i*)cnProcBuf)[%d+i];\n", (lut_startAddrCnGroups[0]>>4)+lut_idxCnProcG3[j][1]*2);
|
||||
/*fprintf(fd, " int8_t* dbg_ptr1 = (int8_t*)&ymm0;\n");
|
||||
fprintf(fd, " printf(\"G3 ymm0[1] @ index %%d: \", %d+i);\n", (lut_startAddrCnGroups[0]>>4)+lut_idxCnProcG3[j][1]*2);
|
||||
fprintf(fd, " for (int d=0; d<16; d++) printf(\"%%d \", dbg_ptr1[d]);\n");
|
||||
fprintf(fd, " printf(\"\\n\");\n");*/
|
||||
|
||||
// min = simde_mm_min_epu8(min, simde_mm_abs_epi8(ymm0));
|
||||
fprintf(fd," min = simde_mm_min_epu8(min, simde_mm_abs_epi8(ymm0));\n");
|
||||
|
||||
@@ -157,6 +166,12 @@ void nrLDPC_cnProc_BG1_generator_128(const char* dir, int R)
|
||||
// *p_cnProcBufResBit = simde_mm_sign_epi8(min, sgn);
|
||||
// p_cnProcBufResBit++;
|
||||
fprintf(fd," ((simde__m128i*)cnProcBufRes)[%d+i] = simde_mm_sign_epi8(min, sgn);\n",(lut_startAddrCnGroups[0]>>4)+(j*bitOffsetInGroup));
|
||||
//Here is for debug
|
||||
//fprintf(fd, " int8_t* debug_ptr = (int8_t*)&((simde__m128i*)cnProcBufRes)[%d+i];\n", (lut_startAddrCnGroups[0]>>4)+(j*bitOffsetInGroup));
|
||||
//fprintf(fd, " printf(\"cn_Proc_output[%d+i]: \");\n", (lut_startAddrCnGroups[0]>>4)+(j*bitOffsetInGroup));
|
||||
//fprintf(fd, " for (int d=0; d<16; d++) printf(\"%%d \", debug_ptr[d]);\n");
|
||||
//fprintf(fd, " printf(\"\\n\");\n");
|
||||
|
||||
fprintf(fd," }\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ int main(int argc, char *argv[])
|
||||
int R[NB_R]={0,1,2};
|
||||
for(int i=0; i<NB_R;i++) {
|
||||
nrLDPC_cnProc_BG1_generator_128(dir, R[i]);
|
||||
printf("\ndir:%s\n",dir);
|
||||
nrLDPC_cnProc_BG2_generator_128(dir, R[i]);
|
||||
}
|
||||
|
||||
|
||||
@@ -90,6 +90,8 @@ typedef struct nrLDPC_dec_params {
|
||||
e_nrLDPC_outMode outMode; /**< Output format */
|
||||
int crc_type; /**< Size and type of the parity check bits (16, 24A or 24B) */
|
||||
int (*check_crc)(uint8_t* decoded_bytes, uint32_t n, uint8_t crc_type); /**< Parity check function */
|
||||
int n_segments;/**Infomation for cuda streaming*/
|
||||
int LastTrial;/**Infomation for cuda streaming to create and destroy*/
|
||||
} t_nrLDPC_dec_params;
|
||||
|
||||
/**
|
||||
|
||||
@@ -58,6 +58,7 @@ typedef struct {
|
||||
time_stats_t *tprep;
|
||||
time_stats_t *tparity;
|
||||
time_stats_t *toutput;
|
||||
time_stats_t *tconcat;
|
||||
/// Size in bits of the code segments
|
||||
uint32_t K;
|
||||
/// Number of lifting sizes to fit the payload
|
||||
@@ -93,5 +94,7 @@ typedef int32_t(LDPC_decoderfunc_t)(t_nrLDPC_dec_params *p_decParams,
|
||||
t_nrLDPC_time_stats *,
|
||||
decode_abort_t *ab);
|
||||
typedef int32_t(LDPC_encoderfunc_t)(uint8_t **, uint8_t *, encoder_implemparams_t *);
|
||||
typedef int32_t(LDPC_encoderfunc32_t)(uint8_t **, uint32_t [4][68*384], encoder_implemparams_t *);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
227
openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG1_Zc384_32bit.cu
Normal file
227
openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG1_Zc384_32bit.cu
Normal file
@@ -0,0 +1,227 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#if USE_CUDA
|
||||
#include <cuda_runtime.h>
|
||||
#endif
|
||||
// generated code for Zc=384, byte encoding
|
||||
__global__ void ldpc_BG1_Zc384_worker(uint32_t *c[4],uint32_t *d[4]) {
|
||||
uint32_t *c32=c[blockIdx.x];
|
||||
uint32_t *d32=d[blockIdx.x];
|
||||
|
||||
int i2 = threadIdx.x;
|
||||
int i1 = blockIdx.y;
|
||||
if (i2 < 384) {
|
||||
c32+=i2;
|
||||
d32+=i2;
|
||||
switch(i1) {
|
||||
case 0:
|
||||
d32[0]=c32[307]^c32[76]^c32[205]^c32[276]^c32[787]^c32[1018]^c32[855]^c32[1586]^c32[1612]^c32[1864]^c32[2673]^c32[2377]^c32[2304]^c32[3360]^c32[3404]^c32[3347]^c32[4021]^c32[3984]^c32[4096]^c32[4824]^c32[4769]^c32[4807]^c32[5707]^c32[5643]^c32[5529]^c32[6475]^c32[6304]^c32[6200]^c32[7229]^c32[7090]^c32[6975]^c32[7968]^c32[7809]^c32[7812]^c32[8557]^c32[8743]^c32[8753]^c32[9233]^c32[9558]^c32[9447]^c32[10341]^c32[10184]^c32[10325]^c32[10969]^c32[10840]^c32[10964]^c32[11735]^c32[11619]^c32[11573]^c32[12394]^c32[12642]^c32[12592]^c32[13170]^c32[13187]^c32[13356]^c32[14066]^c32[14064]^c32[14095]^c32[14772]^c32[14923]^c32[14797]^c32[15690]^c32[15373]^c32[15399]^c32[16474]^c32[16240]^c32[16485];
|
||||
|
||||
break;
|
||||
case 1:
|
||||
d32[384]=c32[307]^c32[308]^c32[77]^c32[206]^c32[277]^c32[787]^c32[788]^c32[1019]^c32[856]^c32[1586]^c32[1587]^c32[1613]^c32[1865]^c32[2673]^c32[2674]^c32[2378]^c32[2305]^c32[3361]^c32[3405]^c32[3348]^c32[4021]^c32[4022]^c32[3985]^c32[4097]^c32[4824]^c32[4825]^c32[4770]^c32[4808]^c32[5708]^c32[5644]^c32[5530]^c32[6476]^c32[6305]^c32[6201]^c32[7229]^c32[7230]^c32[7091]^c32[6976]^c32[7968]^c32[7969]^c32[7810]^c32[7813]^c32[8557]^c32[8558]^c32[8744]^c32[8754]^c32[9233]^c32[9234]^c32[9559]^c32[9448]^c32[10341]^c32[10342]^c32[10185]^c32[10326]^c32[10970]^c32[10841]^c32[10965]^c32[11735]^c32[11736]^c32[11620]^c32[11574]^c32[12394]^c32[12395]^c32[12643]^c32[12593]^c32[13171]^c32[13188]^c32[13357]^c32[14066]^c32[14067]^c32[14065]^c32[14096]^c32[14772]^c32[14773]^c32[14924]^c32[14798]^c32[15690]^c32[15691]^c32[15374]^c32[15400]^c32[16474]^c32[16475]^c32[16241]^c32[16486];
|
||||
|
||||
break;
|
||||
case 2:
|
||||
d32[768]=c32[308]^c32[77]^c32[205]^c32[206]^c32[276]^c32[277]^c32[788]^c32[1018]^c32[1019]^c32[855]^c32[856]^c32[1587]^c32[1613]^c32[1864]^c32[1865]^c32[2674]^c32[2378]^c32[2304]^c32[2305]^c32[3361]^c32[3404]^c32[3405]^c32[3347]^c32[3348]^c32[4022]^c32[3985]^c32[4096]^c32[4097]^c32[4825]^c32[4769]^c32[4770]^c32[4807]^c32[4808]^c32[5708]^c32[5643]^c32[5644]^c32[5529]^c32[5530]^c32[6476]^c32[6304]^c32[6305]^c32[6200]^c32[6201]^c32[7230]^c32[7091]^c32[6975]^c32[6976]^c32[7969]^c32[7809]^c32[7810]^c32[7812]^c32[7813]^c32[8558]^c32[8744]^c32[8753]^c32[8754]^c32[9234]^c32[9559]^c32[9447]^c32[9448]^c32[10342]^c32[10184]^c32[10185]^c32[10325]^c32[10326]^c32[10970]^c32[10840]^c32[10841]^c32[10964]^c32[10965]^c32[11736]^c32[11620]^c32[11573]^c32[11574]^c32[12395]^c32[12643]^c32[12592]^c32[12593]^c32[13171]^c32[13187]^c32[13188]^c32[13356]^c32[13357]^c32[14067]^c32[14064]^c32[14065]^c32[14095]^c32[14096]^c32[14773]^c32[14924]^c32[14797]^c32[14798]^c32[15691]^c32[15373]^c32[15374]^c32[15399]^c32[15400]^c32[16475]^c32[16241]^c32[16485]^c32[16486];
|
||||
|
||||
break;
|
||||
case 3:
|
||||
d32[1152]=c32[308]^c32[77]^c32[206]^c32[276]^c32[277]^c32[788]^c32[1019]^c32[855]^c32[856]^c32[1587]^c32[1613]^c32[1865]^c32[2674]^c32[2378]^c32[2304]^c32[2305]^c32[3361]^c32[3405]^c32[3347]^c32[3348]^c32[4022]^c32[3985]^c32[4097]^c32[4825]^c32[4770]^c32[4807]^c32[4808]^c32[5708]^c32[5644]^c32[5529]^c32[5530]^c32[6476]^c32[6305]^c32[6200]^c32[6201]^c32[7230]^c32[7091]^c32[6976]^c32[7969]^c32[7810]^c32[7812]^c32[7813]^c32[8558]^c32[8744]^c32[8753]^c32[8754]^c32[9234]^c32[9559]^c32[9447]^c32[9448]^c32[10342]^c32[10185]^c32[10325]^c32[10326]^c32[10970]^c32[10841]^c32[10964]^c32[10965]^c32[11736]^c32[11620]^c32[11574]^c32[12395]^c32[12643]^c32[12592]^c32[12593]^c32[13171]^c32[13188]^c32[13356]^c32[13357]^c32[14067]^c32[14065]^c32[14095]^c32[14096]^c32[14773]^c32[14924]^c32[14798]^c32[15691]^c32[15374]^c32[15399]^c32[15400]^c32[16475]^c32[16241]^c32[16485]^c32[16486];
|
||||
|
||||
break;
|
||||
case 4:
|
||||
d32[1536]=c32[332]^c32[949];
|
||||
|
||||
break;
|
||||
case 5:
|
||||
d32[1920]=c32[80]^c32[233]^c32[362]^c32[49]^c32[195]^c32[944]^c32[791]^c32[1012]^c32[782]^c32[1743]^c32[1769]^c32[1637]^c32[2446]^c32[2534]^c32[2461]^c32[2419]^c32[3133]^c32[3177]^c32[3120]^c32[4178]^c32[4141]^c32[3869]^c32[4981]^c32[4926]^c32[4964]^c32[5480]^c32[5416]^c32[5686]^c32[6248]^c32[6461]^c32[6357]^c32[7002]^c32[7247]^c32[7132]^c32[7741]^c32[7966]^c32[7969]^c32[8714]^c32[8516]^c32[8526]^c32[9390]^c32[9331]^c32[9220]^c32[9382]^c32[10114]^c32[10341]^c32[10098]^c32[11126]^c32[10997]^c32[11121]^c32[11892]^c32[11776]^c32[11730]^c32[12551]^c32[12415]^c32[12365]^c32[12529]^c32[13327]^c32[13344]^c32[13129]^c32[13839]^c32[13837]^c32[13868]^c32[14929]^c32[14696]^c32[14954]^c32[15463]^c32[15530]^c32[15556]^c32[16247]^c32[16397]^c32[16258]^c32[16179];
|
||||
|
||||
break;
|
||||
case 6:
|
||||
d32[2304]=c32[278]^c32[4865]^c32[7681]^c32[8799]^c32[10076]^c32[13309]^c32[13842]^c32[15585];
|
||||
|
||||
break;
|
||||
case 7:
|
||||
d32[2688]=c32[9]^c32[830]^c32[3388]^c32[5709]^c32[6434]^c32[10866];
|
||||
|
||||
break;
|
||||
case 8:
|
||||
d32[3072]=c32[374]^c32[94]^c32[143]^c32[247]^c32[272]^c32[375]^c32[376]^c32[343]^c32[62]^c32[63]^c32[307]^c32[854]^c32[958]^c32[1085]^c32[804]^c32[805]^c32[922]^c32[1025]^c32[1026]^c32[947]^c32[1653]^c32[1757]^c32[1679]^c32[1783]^c32[1547]^c32[1650]^c32[1651]^c32[2356]^c32[2460]^c32[2444]^c32[2548]^c32[2371]^c32[2474]^c32[2475]^c32[2469]^c32[3427]^c32[3147]^c32[3087]^c32[3190]^c32[3191]^c32[3414]^c32[3133]^c32[3134]^c32[4088]^c32[4192]^c32[4051]^c32[4155]^c32[4163]^c32[3882]^c32[3883]^c32[4891]^c32[4611]^c32[4836]^c32[4939]^c32[4940]^c32[4874]^c32[4977]^c32[4978]^c32[5390]^c32[5494]^c32[5710]^c32[5429]^c32[5430]^c32[5596]^c32[5699]^c32[5700]^c32[6158]^c32[6262]^c32[6371]^c32[6474]^c32[6475]^c32[6267]^c32[6370]^c32[6371]^c32[6912]^c32[7016]^c32[7157]^c32[7261]^c32[7042]^c32[7145]^c32[7146]^c32[8035]^c32[7755]^c32[7876]^c32[7979]^c32[7980]^c32[7879]^c32[7982]^c32[7983]^c32[8624]^c32[8728]^c32[8810]^c32[8530]^c32[8820]^c32[8539]^c32[8540]^c32[9300]^c32[9404]^c32[9241]^c32[9345]^c32[9514]^c32[9233]^c32[9234]^c32[9234]^c32[10024]^c32[10128]^c32[10251]^c32[10354]^c32[10355]^c32[10008]^c32[10111]^c32[10112]^c32[11036]^c32[10756]^c32[10907]^c32[11010]^c32[11011]^c32[11031]^c32[11134]^c32[11135]^c32[11802]^c32[11522]^c32[11686]^c32[11790]^c32[11640]^c32[11743]^c32[11744]^c32[12461]^c32[12565]^c32[12325]^c32[12429]^c32[12659]^c32[12378]^c32[12379]^c32[12327]^c32[13237]^c32[13341]^c32[13254]^c32[13357]^c32[13358]^c32[13423]^c32[13142]^c32[13143]^c32[14133]^c32[13853]^c32[14131]^c32[13850]^c32[13851]^c32[14162]^c32[13881]^c32[13882]^c32[14839]^c32[14943]^c32[14606]^c32[14710]^c32[14864]^c32[14967]^c32[14968]^c32[14816]^c32[15373]^c32[15477]^c32[15440]^c32[15543]^c32[15544]^c32[15466]^c32[15569]^c32[15570]^c32[16157]^c32[16261]^c32[16307]^c32[16411]^c32[16168]^c32[16271]^c32[16272]^c32[16496];
|
||||
|
||||
break;
|
||||
case 9:
|
||||
d32[3456]=c32[366]^c32[1000]^c32[8001]^c32[8581]^c32[10041]^c32[13359]^c32[13887]^c32[15442];
|
||||
|
||||
break;
|
||||
case 10:
|
||||
d32[3840]=c32[869]^c32[1875]^c32[3346]^c32[5487]^c32[6527]^c32[11106];
|
||||
|
||||
break;
|
||||
case 11:
|
||||
d32[4224]=c32[257]^c32[38]^c32[39]^c32[26]^c32[192]^c32[155]^c32[321]^c32[226]^c32[8]^c32[48]^c32[1121]^c32[902]^c32[903]^c32[968]^c32[1134]^c32[805]^c32[971]^c32[870]^c32[1536]^c32[1701]^c32[1702]^c32[1562]^c32[1728]^c32[1814]^c32[1596]^c32[2623]^c32[2404]^c32[2405]^c32[2327]^c32[2493]^c32[2638]^c32[2420]^c32[3310]^c32[3092]^c32[3354]^c32[3136]^c32[3297]^c32[3079]^c32[3971]^c32[4136]^c32[4137]^c32[3934]^c32[4100]^c32[4046]^c32[4212]^c32[4774]^c32[4939]^c32[4940]^c32[4719]^c32[4885]^c32[4757]^c32[4923]^c32[5657]^c32[5439]^c32[5593]^c32[5759]^c32[5479]^c32[5645]^c32[6425]^c32[6207]^c32[6254]^c32[6420]^c32[6150]^c32[6316]^c32[7179]^c32[6960]^c32[6961]^c32[7040]^c32[7206]^c32[6925]^c32[7091]^c32[7918]^c32[7699]^c32[7700]^c32[7759]^c32[7925]^c32[7762]^c32[7928]^c32[8507]^c32[8672]^c32[8673]^c32[8693]^c32[8475]^c32[8703]^c32[8485]^c32[9567]^c32[9348]^c32[9349]^c32[9508]^c32[9290]^c32[9397]^c32[9563]^c32[9224]^c32[10291]^c32[10072]^c32[10073]^c32[10134]^c32[10300]^c32[10275]^c32[10057]^c32[10919]^c32[11085]^c32[10790]^c32[10956]^c32[10914]^c32[11080]^c32[11685]^c32[11850]^c32[11851]^c32[11569]^c32[11735]^c32[11523]^c32[11689]^c32[12344]^c32[12509]^c32[12510]^c32[12592]^c32[12374]^c32[12542]^c32[12324]^c32[12335]^c32[13120]^c32[13286]^c32[13137]^c32[13303]^c32[13306]^c32[13088]^c32[14016]^c32[14181]^c32[14182]^c32[14014]^c32[14180]^c32[14045]^c32[13827]^c32[14722]^c32[14887]^c32[14888]^c32[14873]^c32[14655]^c32[14747]^c32[14913]^c32[15640]^c32[15421]^c32[15422]^c32[15707]^c32[15489]^c32[15733]^c32[15515]^c32[16424]^c32[16205]^c32[16206]^c32[16190]^c32[16356]^c32[16435]^c32[16217]^c32[16316];
|
||||
|
||||
break;
|
||||
case 12:
|
||||
d32[4608]=c32[77]^c32[954]^c32[7854]^c32[8680]^c32[10034]^c32[13898];
|
||||
|
||||
break;
|
||||
case 13:
|
||||
d32[4992]=c32[293]^c32[294]^c32[63]^c32[192]^c32[263]^c32[313]^c32[773]^c32[774]^c32[1005]^c32[842]^c32[1572]^c32[1573]^c32[1599]^c32[1851]^c32[2659]^c32[2660]^c32[2364]^c32[2675]^c32[2481]^c32[3347]^c32[3391]^c32[3334]^c32[4007]^c32[4008]^c32[3971]^c32[4083]^c32[4810]^c32[4811]^c32[4756]^c32[4794]^c32[5694]^c32[5630]^c32[5516]^c32[5642]^c32[6462]^c32[6291]^c32[6187]^c32[7215]^c32[7216]^c32[7077]^c32[6962]^c32[7954]^c32[7955]^c32[7796]^c32[7799]^c32[8543]^c32[8544]^c32[8730]^c32[8740]^c32[9219]^c32[9220]^c32[9545]^c32[9434]^c32[10327]^c32[10328]^c32[10171]^c32[10312]^c32[10956]^c32[10827]^c32[10951]^c32[11721]^c32[11722]^c32[11606]^c32[11560]^c32[12380]^c32[12381]^c32[12629]^c32[12579]^c32[13157]^c32[13174]^c32[13343]^c32[14052]^c32[14053]^c32[14051]^c32[14082]^c32[14758]^c32[14759]^c32[14910]^c32[14784]^c32[15676]^c32[15677]^c32[15360]^c32[15386]^c32[15475]^c32[16460]^c32[16461]^c32[16227]^c32[16472];
|
||||
|
||||
break;
|
||||
case 14:
|
||||
d32[5376]=c32[142]^c32[9464]^c32[11657]^c32[12377]^c32[13403]^c32[16140];
|
||||
|
||||
break;
|
||||
case 15:
|
||||
d32[5760]=c32[193]^c32[346]^c32[91]^c32[161]^c32[162]^c32[241]^c32[1057]^c32[904]^c32[1124]^c32[1125]^c32[770]^c32[1856]^c32[1882]^c32[1750]^c32[2559]^c32[2647]^c32[2573]^c32[2574]^c32[3246]^c32[3290]^c32[3232]^c32[3233]^c32[3907]^c32[3870]^c32[3982]^c32[4710]^c32[4655]^c32[4692]^c32[4693]^c32[5593]^c32[5529]^c32[5414]^c32[5415]^c32[6361]^c32[6190]^c32[6469]^c32[6470]^c32[7115]^c32[6976]^c32[7245]^c32[7854]^c32[7695]^c32[7697]^c32[7698]^c32[7890]^c32[8827]^c32[8629]^c32[8638]^c32[8639]^c32[9503]^c32[9444]^c32[9332]^c32[9333]^c32[10227]^c32[10070]^c32[10210]^c32[10211]^c32[10302]^c32[10855]^c32[11110]^c32[10849]^c32[10850]^c32[11621]^c32[11889]^c32[11843]^c32[12664]^c32[12528]^c32[12477]^c32[12478]^c32[13056]^c32[13073]^c32[13241]^c32[13242]^c32[13952]^c32[13950]^c32[13980]^c32[13981]^c32[13879]^c32[14658]^c32[14809]^c32[14683]^c32[15576]^c32[15643]^c32[15668]^c32[15669]^c32[16360]^c32[16510]^c32[16370]^c32[16371];
|
||||
|
||||
break;
|
||||
case 16:
|
||||
d32[6144]=c32[364]^c32[133]^c32[262]^c32[333]^c32[844]^c32[1075]^c32[912]^c32[781]^c32[1643]^c32[1669]^c32[1537]^c32[2346]^c32[2434]^c32[2361]^c32[2642]^c32[3417]^c32[3077]^c32[3404]^c32[4078]^c32[4041]^c32[4153]^c32[4881]^c32[4826]^c32[4864]^c32[5380]^c32[5700]^c32[5586]^c32[6148]^c32[6361]^c32[6257]^c32[7286]^c32[7147]^c32[7032]^c32[8025]^c32[7866]^c32[7869]^c32[8614]^c32[8800]^c32[8810]^c32[8505]^c32[9290]^c32[9231]^c32[9504]^c32[10014]^c32[10241]^c32[9998]^c32[11026]^c32[10897]^c32[11021]^c32[11792]^c32[11676]^c32[11630]^c32[12451]^c32[12315]^c32[12649]^c32[13227]^c32[13244]^c32[13413]^c32[14123]^c32[14121]^c32[14152]^c32[14829]^c32[14596]^c32[14854]^c32[15363]^c32[15430]^c32[15456]^c32[15649]^c32[16147]^c32[16297]^c32[16158];
|
||||
|
||||
break;
|
||||
case 17:
|
||||
d32[6528]=c32[260]^c32[11055]^c32[12369]^c32[13414]^c32[16503];
|
||||
|
||||
break;
|
||||
case 18:
|
||||
d32[6912]=c32[898]^c32[9379]^c32[10264]^c32[13956]^c32[14596];
|
||||
|
||||
break;
|
||||
case 19:
|
||||
d32[7296]=c32[145]^c32[981]^c32[5720]^c32[6386]^c32[7877];
|
||||
|
||||
break;
|
||||
case 20:
|
||||
d32[7680]=c32[366]^c32[135]^c32[264]^c32[335]^c32[187]^c32[846]^c32[1077]^c32[914]^c32[1645]^c32[1671]^c32[1539]^c32[2348]^c32[2436]^c32[2363]^c32[2510]^c32[3419]^c32[3079]^c32[3406]^c32[4080]^c32[4043]^c32[4155]^c32[4883]^c32[4828]^c32[4866]^c32[5382]^c32[5702]^c32[5588]^c32[6150]^c32[6363]^c32[6259]^c32[7288]^c32[7149]^c32[7034]^c32[7176]^c32[8027]^c32[7868]^c32[7871]^c32[8616]^c32[8802]^c32[8812]^c32[8789]^c32[9292]^c32[9233]^c32[9506]^c32[10016]^c32[10243]^c32[10000]^c32[11028]^c32[10899]^c32[11023]^c32[11794]^c32[11678]^c32[11632]^c32[12453]^c32[12317]^c32[12651]^c32[13229]^c32[13246]^c32[13415]^c32[14125]^c32[14123]^c32[14154]^c32[14831]^c32[14598]^c32[14856]^c32[15365]^c32[15432]^c32[15458]^c32[16149]^c32[16299]^c32[16160];
|
||||
|
||||
break;
|
||||
case 21:
|
||||
d32[8064]=c32[973]^c32[3942]^c32[12616]^c32[15573]^c32[16225];
|
||||
|
||||
break;
|
||||
case 22:
|
||||
d32[8448]=c32[30]^c32[9227]^c32[10217]^c32[13078];
|
||||
|
||||
break;
|
||||
case 23:
|
||||
d32[8832]=c32[792]^c32[1625]^c32[7741]^c32[13851];
|
||||
|
||||
break;
|
||||
case 24:
|
||||
d32[9216]=c32[157]^c32[310]^c32[55]^c32[126]^c32[298]^c32[1021]^c32[868]^c32[1089]^c32[1820]^c32[1846]^c32[1714]^c32[2523]^c32[2611]^c32[2538]^c32[2462]^c32[3210]^c32[3254]^c32[3197]^c32[3307]^c32[3871]^c32[4218]^c32[3946]^c32[4674]^c32[4619]^c32[4657]^c32[5557]^c32[5493]^c32[5379]^c32[6325]^c32[6154]^c32[6434]^c32[7079]^c32[6940]^c32[7209]^c32[7818]^c32[8043]^c32[8046]^c32[8791]^c32[8593]^c32[8603]^c32[8787]^c32[9467]^c32[9408]^c32[9297]^c32[10191]^c32[10034]^c32[10175]^c32[10819]^c32[11074]^c32[10814]^c32[11585]^c32[11853]^c32[11807]^c32[12628]^c32[12492]^c32[12442]^c32[13404]^c32[13421]^c32[13206]^c32[13916]^c32[13914]^c32[13945]^c32[14622]^c32[14773]^c32[14647]^c32[15540]^c32[15607]^c32[15633]^c32[16324]^c32[16474]^c32[16335];
|
||||
|
||||
break;
|
||||
case 25:
|
||||
d32[9600]=c32[840]^c32[4625]^c32[5759]^c32[11064];
|
||||
|
||||
break;
|
||||
case 26:
|
||||
d32[9984]=c32[71]^c32[1617]^c32[3148]^c32[11656];
|
||||
|
||||
break;
|
||||
case 27:
|
||||
d32[10368]=c32[962]^c32[4802]^c32[6245];
|
||||
|
||||
break;
|
||||
case 28:
|
||||
d32[10752]=c32[222]^c32[3091]^c32[14836]^c32[16402];
|
||||
|
||||
break;
|
||||
case 29:
|
||||
d32[11136]=c32[2]^c32[155]^c32[284]^c32[354]^c32[355]^c32[866]^c32[1097]^c32[933]^c32[934]^c32[1020]^c32[1665]^c32[1691]^c32[1559]^c32[2368]^c32[2456]^c32[2382]^c32[2383]^c32[3439]^c32[3099]^c32[3425]^c32[3426]^c32[4100]^c32[4063]^c32[4175]^c32[4903]^c32[4848]^c32[4885]^c32[4886]^c32[5402]^c32[5722]^c32[5607]^c32[5608]^c32[6170]^c32[6383]^c32[6278]^c32[6279]^c32[6924]^c32[7169]^c32[7054]^c32[8047]^c32[7888]^c32[7890]^c32[7891]^c32[8636]^c32[8822]^c32[8831]^c32[8448]^c32[9312]^c32[9253]^c32[9525]^c32[9526]^c32[10036]^c32[10263]^c32[10019]^c32[10020]^c32[11048]^c32[10919]^c32[11042]^c32[11043]^c32[10757]^c32[11814]^c32[11698]^c32[11652]^c32[12473]^c32[12337]^c32[12670]^c32[12671]^c32[13249]^c32[13266]^c32[13434]^c32[13435]^c32[14145]^c32[14143]^c32[14173]^c32[14174]^c32[13971]^c32[14851]^c32[14618]^c32[14876]^c32[15385]^c32[15452]^c32[15477]^c32[15478]^c32[16169]^c32[16319]^c32[16179]^c32[16180];
|
||||
|
||||
break;
|
||||
case 30:
|
||||
d32[11520]=c32[14]^c32[167]^c32[295]^c32[296]^c32[366]^c32[367]^c32[159]^c32[878]^c32[1108]^c32[1109]^c32[945]^c32[946]^c32[1677]^c32[1703]^c32[1570]^c32[1571]^c32[2380]^c32[2468]^c32[2394]^c32[2395]^c32[3451]^c32[3110]^c32[3111]^c32[3437]^c32[3438]^c32[4112]^c32[4075]^c32[4186]^c32[4187]^c32[4915]^c32[4859]^c32[4860]^c32[4897]^c32[4898]^c32[5414]^c32[5733]^c32[5734]^c32[5619]^c32[5620]^c32[6182]^c32[6394]^c32[6395]^c32[6290]^c32[6291]^c32[6936]^c32[7181]^c32[7065]^c32[7066]^c32[8059]^c32[7899]^c32[7900]^c32[7902]^c32[7903]^c32[7909]^c32[8648]^c32[8450]^c32[8459]^c32[8460]^c32[9324]^c32[9265]^c32[9537]^c32[9538]^c32[10048]^c32[10274]^c32[10275]^c32[10031]^c32[10032]^c32[10244]^c32[11060]^c32[10930]^c32[10931]^c32[11054]^c32[11055]^c32[11826]^c32[11710]^c32[11663]^c32[11664]^c32[12485]^c32[12349]^c32[12298]^c32[12299]^c32[13261]^c32[13277]^c32[13278]^c32[13062]^c32[13063]^c32[14157]^c32[14154]^c32[14155]^c32[14185]^c32[14186]^c32[14863]^c32[14630]^c32[14887]^c32[14888]^c32[15397]^c32[15463]^c32[15464]^c32[15489]^c32[15490]^c32[16181]^c32[16331]^c32[16191]^c32[16192];
|
||||
|
||||
break;
|
||||
case 31:
|
||||
d32[11904]=c32[181]^c32[180]^c32[334]^c32[333]^c32[79]^c32[78]^c32[150]^c32[148]^c32[149]^c32[1045]^c32[1044]^c32[892]^c32[891]^c32[1113]^c32[1111]^c32[1112]^c32[868]^c32[1844]^c32[1843]^c32[1870]^c32[1869]^c32[1738]^c32[1737]^c32[2547]^c32[2546]^c32[2635]^c32[2634]^c32[2562]^c32[2560]^c32[2561]^c32[3234]^c32[3233]^c32[3278]^c32[3277]^c32[3221]^c32[3219]^c32[3220]^c32[3895]^c32[3894]^c32[3858]^c32[3857]^c32[3970]^c32[3969]^c32[4698]^c32[4697]^c32[4643]^c32[4642]^c32[4681]^c32[4679]^c32[4680]^c32[5581]^c32[5580]^c32[5517]^c32[5516]^c32[5403]^c32[5401]^c32[5402]^c32[5591]^c32[6349]^c32[6348]^c32[6178]^c32[6177]^c32[6458]^c32[6456]^c32[6457]^c32[7103]^c32[7102]^c32[6964]^c32[6963]^c32[7233]^c32[7232]^c32[7842]^c32[7841]^c32[7683]^c32[7682]^c32[7686]^c32[7684]^c32[7685]^c32[8815]^c32[8814]^c32[8617]^c32[8616]^c32[8627]^c32[8625]^c32[8626]^c32[9491]^c32[9490]^c32[9432]^c32[9431]^c32[9321]^c32[9319]^c32[9320]^c32[10215]^c32[10214]^c32[10058]^c32[10057]^c32[10199]^c32[10197]^c32[10198]^c32[10843]^c32[10842]^c32[11098]^c32[11097]^c32[10838]^c32[10836]^c32[10837]^c32[11609]^c32[11608]^c32[11877]^c32[11876]^c32[11831]^c32[11830]^c32[12652]^c32[12651]^c32[12516]^c32[12515]^c32[12466]^c32[12464]^c32[12465]^c32[13428]^c32[13427]^c32[13061]^c32[13060]^c32[13230]^c32[13228]^c32[13229]^c32[13940]^c32[13939]^c32[13938]^c32[13937]^c32[13969]^c32[13967]^c32[13968]^c32[14646]^c32[14645]^c32[14797]^c32[14796]^c32[14671]^c32[14670]^c32[15564]^c32[15563]^c32[15631]^c32[15630]^c32[15657]^c32[15655]^c32[15656]^c32[16348]^c32[16347]^c32[16498]^c32[16497]^c32[16359]^c32[16357]^c32[16358];
|
||||
|
||||
break;
|
||||
case 32:
|
||||
d32[12288]=c32[211]^c32[364]^c32[108]^c32[109]^c32[179]^c32[180]^c32[102]^c32[1075]^c32[921]^c32[922]^c32[1142]^c32[1143]^c32[1874]^c32[1900]^c32[1767]^c32[1768]^c32[2577]^c32[2665]^c32[2591]^c32[2592]^c32[3264]^c32[3307]^c32[3308]^c32[3250]^c32[3251]^c32[3925]^c32[3888]^c32[3999]^c32[4000]^c32[4728]^c32[4672]^c32[4673]^c32[4710]^c32[4711]^c32[5611]^c32[5546]^c32[5547]^c32[5432]^c32[5433]^c32[6379]^c32[6207]^c32[6208]^c32[6487]^c32[6488]^c32[7133]^c32[6994]^c32[7262]^c32[7263]^c32[7872]^c32[7712]^c32[7713]^c32[7715]^c32[7716]^c32[8461]^c32[8647]^c32[8656]^c32[8657]^c32[9521]^c32[9462]^c32[9350]^c32[9351]^c32[9417]^c32[10245]^c32[10087]^c32[10088]^c32[10228]^c32[10229]^c32[10873]^c32[11127]^c32[11128]^c32[10867]^c32[10868]^c32[10927]^c32[11639]^c32[11523]^c32[11860]^c32[11861]^c32[12298]^c32[12546]^c32[12495]^c32[12496]^c32[13074]^c32[13090]^c32[13091]^c32[13259]^c32[13260]^c32[13970]^c32[13967]^c32[13968]^c32[13998]^c32[13999]^c32[14676]^c32[14827]^c32[14700]^c32[14701]^c32[15594]^c32[15660]^c32[15661]^c32[15686]^c32[15687]^c32[16378]^c32[16144]^c32[16388]^c32[16389];
|
||||
|
||||
break;
|
||||
case 33:
|
||||
d32[12672]=c32[1091]^c32[1544]^c32[8809]^c32[16233];
|
||||
|
||||
break;
|
||||
case 34:
|
||||
d32[13056]=c32[230]^c32[5524]^c32[11722]^c32[13368];
|
||||
|
||||
break;
|
||||
case 35:
|
||||
d32[13440]=c32[189]^c32[342]^c32[87]^c32[158]^c32[1053]^c32[900]^c32[1121]^c32[1088]^c32[1852]^c32[1878]^c32[1746]^c32[2555]^c32[2643]^c32[2570]^c32[3242]^c32[3286]^c32[3229]^c32[3903]^c32[3866]^c32[3978]^c32[4706]^c32[4651]^c32[4689]^c32[4943]^c32[5589]^c32[5525]^c32[5411]^c32[6357]^c32[6186]^c32[6466]^c32[7111]^c32[6972]^c32[7241]^c32[7850]^c32[7691]^c32[7694]^c32[8823]^c32[8625]^c32[8635]^c32[9499]^c32[9440]^c32[9329]^c32[9218]^c32[10223]^c32[10066]^c32[10207]^c32[10851]^c32[11106]^c32[10846]^c32[11617]^c32[11885]^c32[11839]^c32[12660]^c32[12524]^c32[12474]^c32[13436]^c32[13069]^c32[13238]^c32[13948]^c32[13946]^c32[13977]^c32[14654]^c32[14805]^c32[14679]^c32[15572]^c32[15639]^c32[15665]^c32[16356]^c32[16506]^c32[16367];
|
||||
|
||||
break;
|
||||
case 36:
|
||||
d32[13824]=c32[210]^c32[11065]^c32[11817]^c32[13845];
|
||||
|
||||
break;
|
||||
case 37:
|
||||
d32[14208]=c32[38]^c32[39]^c32[192]^c32[321]^c32[8]^c32[902]^c32[903]^c32[1134]^c32[971]^c32[1037]^c32[1701]^c32[1702]^c32[1728]^c32[1596]^c32[2404]^c32[2405]^c32[2493]^c32[2420]^c32[3092]^c32[3136]^c32[3079]^c32[4136]^c32[4137]^c32[4100]^c32[4212]^c32[4939]^c32[4940]^c32[4885]^c32[4923]^c32[5439]^c32[5759]^c32[5645]^c32[6207]^c32[6420]^c32[6316]^c32[6960]^c32[6961]^c32[7206]^c32[7091]^c32[7699]^c32[7700]^c32[7925]^c32[7928]^c32[8672]^c32[8673]^c32[8475]^c32[8485]^c32[9348]^c32[9349]^c32[9290]^c32[9563]^c32[10072]^c32[10073]^c32[10300]^c32[10057]^c32[10066]^c32[11085]^c32[10956]^c32[11080]^c32[11850]^c32[11851]^c32[11735]^c32[11689]^c32[12509]^c32[12510]^c32[12374]^c32[12324]^c32[13286]^c32[13303]^c32[13088]^c32[14181]^c32[14182]^c32[14180]^c32[13827]^c32[14887]^c32[14888]^c32[14655]^c32[14913]^c32[15421]^c32[15422]^c32[15489]^c32[15515]^c32[16205]^c32[16206]^c32[16356]^c32[16217];
|
||||
|
||||
break;
|
||||
case 38:
|
||||
d32[14592]=c32[185]^c32[7089]^c32[7969]^c32[9430];
|
||||
|
||||
break;
|
||||
case 39:
|
||||
d32[14976]=c32[1026]^c32[2397]^c32[5722]^c32[14889];
|
||||
|
||||
break;
|
||||
case 40:
|
||||
d32[15360]=c32[175]^c32[6181]^c32[13368];
|
||||
|
||||
break;
|
||||
case 41:
|
||||
d32[15744]=c32[820]^c32[2618]^c32[7051]^c32[14112];
|
||||
|
||||
break;
|
||||
case 42:
|
||||
d32[16128]=c32[142]^c32[295]^c32[39]^c32[40]^c32[110]^c32[111]^c32[113]^c32[1006]^c32[852]^c32[853]^c32[1073]^c32[1074]^c32[1805]^c32[1831]^c32[1698]^c32[1699]^c32[2508]^c32[2596]^c32[2522]^c32[2523]^c32[3195]^c32[3238]^c32[3239]^c32[3181]^c32[3182]^c32[3086]^c32[3856]^c32[4203]^c32[3930]^c32[3931]^c32[4659]^c32[4987]^c32[4988]^c32[4641]^c32[4642]^c32[5542]^c32[5477]^c32[5478]^c32[5747]^c32[5748]^c32[6310]^c32[6522]^c32[6523]^c32[6418]^c32[6419]^c32[7064]^c32[6925]^c32[7193]^c32[7194]^c32[7803]^c32[8027]^c32[8028]^c32[8030]^c32[8031]^c32[8776]^c32[8578]^c32[8587]^c32[8588]^c32[9452]^c32[9393]^c32[9281]^c32[9282]^c32[10176]^c32[10018]^c32[10019]^c32[10159]^c32[10160]^c32[10804]^c32[11058]^c32[11059]^c32[10798]^c32[10799]^c32[11570]^c32[11838]^c32[11791]^c32[11792]^c32[12613]^c32[12477]^c32[12426]^c32[12427]^c32[13389]^c32[13405]^c32[13406]^c32[13190]^c32[13191]^c32[13901]^c32[13898]^c32[13899]^c32[13929]^c32[13930]^c32[14607]^c32[14758]^c32[14631]^c32[14632]^c32[15525]^c32[15591]^c32[15592]^c32[15617]^c32[15618]^c32[16309]^c32[16459]^c32[16319]^c32[16320];
|
||||
|
||||
break;
|
||||
case 43:
|
||||
d32[16512]=c32[92]^c32[245]^c32[374]^c32[60]^c32[61]^c32[956]^c32[803]^c32[1023]^c32[1024]^c32[881]^c32[1755]^c32[1781]^c32[1649]^c32[2458]^c32[2546]^c32[2472]^c32[2473]^c32[3145]^c32[3189]^c32[3131]^c32[3132]^c32[4190]^c32[4153]^c32[3881]^c32[4609]^c32[4938]^c32[4975]^c32[4976]^c32[5492]^c32[5428]^c32[5697]^c32[5698]^c32[6260]^c32[6473]^c32[6368]^c32[6369]^c32[7014]^c32[7259]^c32[7144]^c32[7753]^c32[7978]^c32[7980]^c32[7981]^c32[8726]^c32[8528]^c32[8537]^c32[8538]^c32[9402]^c32[9343]^c32[9231]^c32[9232]^c32[10126]^c32[10353]^c32[10109]^c32[10110]^c32[10754]^c32[11009]^c32[11132]^c32[11133]^c32[11520]^c32[11788]^c32[11742]^c32[12563]^c32[12427]^c32[12376]^c32[12377]^c32[12420]^c32[13339]^c32[13356]^c32[13140]^c32[13141]^c32[13851]^c32[13849]^c32[13879]^c32[13880]^c32[13938]^c32[14941]^c32[14708]^c32[14966]^c32[15475]^c32[15542]^c32[15567]^c32[15568]^c32[16259]^c32[16409]^c32[16269]^c32[16270];
|
||||
|
||||
break;
|
||||
case 44:
|
||||
d32[16896]=c32[197]^c32[350]^c32[95]^c32[166]^c32[80]^c32[1061]^c32[908]^c32[1129]^c32[1860]^c32[1886]^c32[1754]^c32[2563]^c32[2651]^c32[2578]^c32[3250]^c32[3294]^c32[3237]^c32[3911]^c32[3874]^c32[3986]^c32[4714]^c32[4659]^c32[4697]^c32[5597]^c32[5533]^c32[5419]^c32[5454]^c32[6365]^c32[6194]^c32[6474]^c32[7119]^c32[6980]^c32[7249]^c32[7075]^c32[7858]^c32[7699]^c32[7702]^c32[8831]^c32[8633]^c32[8643]^c32[9507]^c32[9448]^c32[9337]^c32[10231]^c32[10074]^c32[10215]^c32[10859]^c32[11114]^c32[10854]^c32[11625]^c32[11893]^c32[11847]^c32[12668]^c32[12532]^c32[12482]^c32[13060]^c32[13077]^c32[13246]^c32[13956]^c32[13954]^c32[13985]^c32[14662]^c32[14813]^c32[14687]^c32[15580]^c32[15647]^c32[15673]^c32[16364]^c32[16130]^c32[16375];
|
||||
|
||||
break;
|
||||
case 45:
|
||||
d32[17280]=c32[903]^c32[4757]^c32[7695];
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
extern "C" int ldpc_BG1_Zc384_cuda32(uint32_t *c[4],uint32_t *d[4],int n_inputs) {
|
||||
for (int i=0;i<n_inputs;i++){
|
||||
printf("host c[%d] = %p, d[%d] = %p\n", i, (void*)c[i], i, (void*)d[i]);
|
||||
cudaPointerAttributes attr;
|
||||
cudaPointerAttributes attr1;
|
||||
cudaError_t aerr = cudaPointerGetAttributes(&attr, c[i]);
|
||||
cudaError_t aerr1 = cudaPointerGetAttributes(&attr1, d[i]);
|
||||
if (aerr == cudaSuccess)
|
||||
printf(" attr.memoryType=%d device=%d\n", attr.type, attr.device);
|
||||
else
|
||||
printf(" cudaPointerGetAttributes failed: %s\n", cudaGetErrorString(aerr));
|
||||
if (aerr1 == cudaSuccess)
|
||||
printf(" attr1.memoryType=%d device=%d\n", attr1.type, attr1.device);
|
||||
else
|
||||
printf(" cudaPointerGetAttributes failed: %s\n", cudaGetErrorString(aerr1));
|
||||
}
|
||||
|
||||
printf("n_input = %d\n", n_inputs);
|
||||
dim3 numblocks(n_inputs,46);
|
||||
ldpc_BG1_Zc384_worker<<<numblocks,384>>>(c,d);//<<<numblocks,384>>>(c,d);
|
||||
cudaDeviceSynchronize();
|
||||
return(0);
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*!\file ldpc_encode_parity_check.c
|
||||
* \brief Parity check function used by ldpc encoders
|
||||
* \author Florian Kaltenberger, Raymond Knopp, Kien le Trung (Eurecom)
|
||||
* \email openair_tech@eurecom.fr
|
||||
* \date 27-03-2018
|
||||
* \version 1.0
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "assertions.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include <cuda_runtime.h>
|
||||
|
||||
|
||||
uint32_t *cc0[4];
|
||||
|
||||
int ldpc_BG1_Zc384_cuda32(uint32_t **c,uint32_t **d,int n_inputs);
|
||||
|
||||
extern int managed;
|
||||
|
||||
void encode_parity_check_part_cuda(uint32_t **cc, uint32_t **d, short BG,short Zc,short Kb, int ncols, int n_inputs)
|
||||
{
|
||||
|
||||
uint32_t c[n_inputs][2 * 22 * Zc] ; //double size matrix of c
|
||||
printf("managed = %d\n",managed);
|
||||
for (int s=0;s<n_inputs;s++)
|
||||
for (int i1 = 0; i1 < ncols; i1++) {
|
||||
if (managed) {
|
||||
memcpy(&c[s][2 * i1 * Zc], &cc[s][i1 * Zc], Zc * sizeof(uint32_t));
|
||||
memcpy(&c[s][(2 * i1 + 1) * Zc], &cc[s][i1 * Zc], Zc * sizeof(uint32_t));
|
||||
}
|
||||
else {
|
||||
cudaMemcpy(&cc0[s][2 * i1 * Zc], &cc[s][i1 * Zc], Zc * sizeof(uint32_t),1);
|
||||
cudaMemcpy(&cc0[s][(2 * i1 + 1) * Zc], &cc[s][i1 * Zc], Zc * sizeof(uint32_t),1);
|
||||
}
|
||||
}
|
||||
uint32_t *cp[n_inputs];
|
||||
for (int s=0; s<n_inputs;s++) {
|
||||
if (managed)
|
||||
cp[s]=c[s];
|
||||
else
|
||||
cp[s]=cc0[s];
|
||||
}
|
||||
|
||||
if (BG == 1) {
|
||||
switch (Zc) {
|
||||
case 176:
|
||||
case 192:
|
||||
case 208:
|
||||
case 224:
|
||||
case 240:
|
||||
case 256:
|
||||
case 288:
|
||||
case 320:
|
||||
case 352:
|
||||
AssertFatal(1==0,"BG %d Zc %d not supported yet for CUDA\n",BG, Zc);
|
||||
break;
|
||||
case 384:
|
||||
ldpc_BG1_Zc384_cuda32(cp, d, n_inputs);
|
||||
break;
|
||||
default:
|
||||
AssertFatal(false, "BG %d Zc %d is not supported yet\n", BG, Zc);
|
||||
}
|
||||
} else if (BG == 2) {
|
||||
switch (Zc) {
|
||||
case 72:
|
||||
case 80:
|
||||
case 88:
|
||||
case 96:
|
||||
case 104:
|
||||
case 112:
|
||||
case 120:
|
||||
case 128:
|
||||
case 144:
|
||||
case 160:
|
||||
case 176:
|
||||
case 192:
|
||||
case 208:
|
||||
case 224:
|
||||
case 240:
|
||||
case 256:
|
||||
case 288:
|
||||
case 320:
|
||||
case 352:
|
||||
case 384:
|
||||
default:
|
||||
AssertFatal(false , "BG %d Zc %d is not supported yet\n", BG, Zc);
|
||||
}
|
||||
} else
|
||||
AssertFatal(false, "BG %d is not supported\n", BG);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -58,7 +58,6 @@ int LDPCencoder(unsigned char **inputArray, unsigned char *outputArray, encoder_
|
||||
int no_punctured_columns, removed_bit;
|
||||
int nind=0;
|
||||
int indlist[1000];
|
||||
int indlist2[1000];
|
||||
|
||||
const short *Gen_shift_values = choose_generator_matrix(BG, Zc);
|
||||
if (Gen_shift_values==NULL) {
|
||||
@@ -93,15 +92,13 @@ int LDPCencoder(unsigned char **inputArray, unsigned char *outputArray, encoder_
|
||||
|
||||
// parity check part
|
||||
|
||||
if (gen_code>=1)
|
||||
if (gen_code==1 || gen_code==2 || gen_code==3)
|
||||
{
|
||||
char fname[100];
|
||||
sprintf(fname,"ldpc_BG%d_Zc%d_byte.c",BG,Zc);
|
||||
FILE *fd=fopen(fname,"w");
|
||||
AssertFatal(fd!=NULL,"cannot open %s\n",fname);
|
||||
sprintf(fname,"ldpc_BG%d_Zc%d_16bit.c",BG,Zc);
|
||||
FILE *fd2=fopen(fname,"w");
|
||||
AssertFatal(fd2!=NULL,"cannot open %s\n",fname);
|
||||
|
||||
|
||||
int shift;
|
||||
char data_type[100];
|
||||
@@ -112,7 +109,7 @@ int LDPCencoder(unsigned char **inputArray, unsigned char *outputArray, encoder_
|
||||
|
||||
|
||||
fprintf(fd,"#include \"PHY/sse_intrin.h\"\n");
|
||||
fprintf(fd2,"#include \"PHY/sse_intrin.h\"\n");
|
||||
|
||||
|
||||
if (gen_code == 1 && (Zc&63)==0) {
|
||||
shift=6;
|
||||
@@ -126,14 +123,14 @@ int LDPCencoder(unsigned char **inputArray, unsigned char *outputArray, encoder_
|
||||
strcpy(data_type,"simde__m256i");
|
||||
strcpy(xor_command,"simde_mm256_xor_si256");
|
||||
}
|
||||
else if ((Zc&15)==0) {
|
||||
else if ((gen_code <=2) && (Zc&15)==0) {
|
||||
shift=4; // SSE4 - 128-bit SIMD
|
||||
mask=15;
|
||||
strcpy(data_type,"simde__m128i");
|
||||
strcpy(xor_command,"simde_mm_xor_si128");
|
||||
|
||||
}
|
||||
else if ((Zc&7)==0) {
|
||||
else if ((gen_code <=2) && (Zc&7)==0) {
|
||||
shift=3; // MMX - 64-bit SIMD
|
||||
mask=7;
|
||||
strcpy(data_type,"simde__m64");
|
||||
@@ -145,21 +142,15 @@ int LDPCencoder(unsigned char **inputArray, unsigned char *outputArray, encoder_
|
||||
strcpy(data_type,"uint8_t");
|
||||
strcpy(xor_command,"scalar_xor");
|
||||
fprintf(fd,"#define scalar_xor(a,b) ((a)^(b))\n");
|
||||
fprintf(fd2,"#define scalar_xor(a,b) ((a)^(b))\n");
|
||||
|
||||
}
|
||||
fprintf(fd,"// generated code for Zc=%d, byte encoding\n",Zc);
|
||||
fprintf(fd2,"// generated code for Zc=%d, 16bit encoding\n",Zc);
|
||||
fprintf(fd,"static inline void ldpc_BG%d_Zc%d_byte(uint8_t *c,uint8_t *d) {\n",BG,Zc);
|
||||
fprintf(fd2,"static inline void ldpc_BG%d_Zc%d_16bit(uint16_t *c,uint16_t *d) {\n",BG,Zc);
|
||||
fprintf(fd," %s *csimd=(%s *)c,*dsimd=(%s *)d;\n\n",data_type,data_type,data_type);
|
||||
fprintf(fd2," %s *csimd=(%s *)c,*dsimd=(%s *)d;\n\n",data_type,data_type,data_type);
|
||||
fprintf(fd," %s *c2,*d2;\n\n",data_type);
|
||||
fprintf(fd2," %s *c2,*d2;\n\n",data_type);
|
||||
fprintf(fd," int i2;\n");
|
||||
fprintf(fd2," int i2;\n");
|
||||
fprintf(fd," for (i2=0; i2<%d; i2++) {\n",Zc>>shift);
|
||||
if (shift > 0)
|
||||
fprintf(fd2," for (i2=0; i2<%d; i2++) {\n",Zc>>(shift-1));
|
||||
|
||||
for (i2=0; i2 < 1; i2++)
|
||||
{
|
||||
//t=Kb*Zc+i2;
|
||||
@@ -169,53 +160,88 @@ int LDPCencoder(unsigned char **inputArray, unsigned char *outputArray, encoder_
|
||||
|
||||
fprintf(fd," c2=&csimd[i2];\n");
|
||||
fprintf(fd," d2=&dsimd[i2];\n");
|
||||
fprintf(fd2," c2=&csimd[i2];\n");
|
||||
fprintf(fd2," d2=&dsimd[i2];\n");
|
||||
|
||||
for (i1 = 0; i1 < nrows; i1++)
|
||||
|
||||
{
|
||||
fprintf(fd,"\n//row: %d\n",i1);
|
||||
fprintf(fd2,"\n//row: %d\n",i1);
|
||||
AssertFatal(shift > 0 , "The result of the right shift is undefined because the right operand is negative\n");
|
||||
AssertFatal(shift >= 0 , "The result of the right shift is undefined because the right operand is negative\n");
|
||||
fprintf(fd," d2[%d]=",(Zc*i1)>>shift);
|
||||
fprintf(fd2," d2[%d]=",(Zc*i1)>>(shift-1));
|
||||
|
||||
nind=0;
|
||||
|
||||
for (i3=0; i3 < ncols; i3++)
|
||||
{
|
||||
temp_prime=i1 * ncols + i3;
|
||||
|
||||
|
||||
for (i4=0; i4 < no_shift_values[temp_prime]; i4++)
|
||||
{
|
||||
|
||||
{
|
||||
var=(int)((i3*Zc + (Gen_shift_values[ pointer_shift_values[temp_prime]+i4 ]+1)%Zc)/Zc);
|
||||
int index =var*2*Zc + (i3*Zc + (Gen_shift_values[ pointer_shift_values[temp_prime]+i4 ]+1)%Zc) % Zc;
|
||||
printf("var %d, i3 %d, i4 %d, index %d, shift %d, Zc %d, pointer_shift_values[%d] %d gen_shift_value %d\n",var,i3,i4,index,shift,Zc,temp_prime,pointer_shift_values[temp_prime],Gen_shift_values[pointer_shift_values[temp_prime]]);
|
||||
indlist[nind] = ((index&mask)*((2*Zc*ncols)>>shift)/* *Kb */)+(index>>shift);
|
||||
printf("indlist[%d] %d, index&mask %d, index>>shift %d\n",nind,indlist[nind],index&mask,index>>shift);
|
||||
indlist2[nind++] = ((index&(mask>>1))*((2*Zc*ncols)>>(shift-1))*Kb)+(index>>(shift-1));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
indlist[nind++] = ((index&mask)*((2*Zc*ncols)>>shift)/* *Kb */)+(index>>shift);
|
||||
printf("indlist[%d] %d, index&mask %d, index>>shift %d\n",nind,indlist[nind],index&mask,index>>shift);
|
||||
}//i4
|
||||
}//i3
|
||||
for (i4=0;i4<nind-1;i4++) {
|
||||
fprintf(fd,"%s(c2[%d],",xor_command,indlist[i4]);
|
||||
fprintf(fd2,"%s(c2[%d],",xor_command,indlist2[i4]);
|
||||
}
|
||||
fprintf(fd,"%s(c2[%d],",xor_command,indlist[i4]);
|
||||
} //i4
|
||||
fprintf(fd,"c2[%d]",indlist[i4]);
|
||||
fprintf(fd2,"c2[%d]",indlist2[i4]);
|
||||
for (i4=0;i4<nind-1;i4++) { fprintf(fd,")"); fprintf(fd2,")"); }
|
||||
fprintf(fd,";\n");
|
||||
fprintf(fd2, ";\n");
|
||||
}
|
||||
fprintf(fd," }\n}\n");
|
||||
fprintf(fd2," }\n}\n");
|
||||
}
|
||||
for (i4=0;i4<nind-1;i4++) fprintf(fd,")");
|
||||
fprintf(fd,";\n");
|
||||
} // i1
|
||||
fprintf(fd," }\n}\n");
|
||||
} // i2
|
||||
fclose(fd);
|
||||
}
|
||||
else if (gen_code == 4) { // CUDA
|
||||
char fname[100];
|
||||
sprintf(fname,"ldpc_BG%d_Zc%d_32bit.cu",BG,Zc);
|
||||
FILE *fd=fopen(fname,"w");
|
||||
AssertFatal(fd!=NULL,"cannot open %s\n",fname);
|
||||
printf("Writing to %s\n",fname);
|
||||
fprintf(fd,"#include <stdio.h>\n#include <stdint.h>\n#include <cuda_runtime.h>\n");
|
||||
|
||||
fprintf(fd,"// generated code for Zc=%d, byte encoding\n",Zc);
|
||||
fprintf(fd,"__global__ void ldpc_BG%d_Zc%d_worker(uint8_t *c,uint8_t *d) {\n",BG,Zc);
|
||||
fprintf(fd," uint32_t *c32=(uint32_t *)c;\n uint32_t *d32=(uint32_t *)d;\n\n");
|
||||
fprintf(fd," int i2 = threadIdx.x;\n");
|
||||
fprintf(fd," int i1 = blockIdx.x;\n");
|
||||
fprintf(fd," if (i2 < %d) {\n",Zc);
|
||||
fprintf(fd," c32+=i2;\n");
|
||||
fprintf(fd," d32+=i2;\n");
|
||||
fprintf(fd," switch(i1) {\n");
|
||||
|
||||
for (int i1=0;i1<nrows;i1++) {
|
||||
nind = 0;
|
||||
fprintf(fd," case %d:\n",i1);
|
||||
fprintf(fd," d32[%d]=",(Zc*i1));
|
||||
for (i3=0; i3 < ncols; i3++)
|
||||
{
|
||||
temp_prime=i1 * ncols + i3;
|
||||
for (i4=0; i4 < no_shift_values[temp_prime]; i4++)
|
||||
{
|
||||
var=(int)((i3*Zc + (Gen_shift_values[ pointer_shift_values[temp_prime]+i4 ]+1)%Zc)/Zc);
|
||||
int index =var*2*Zc + (i3*Zc + (Gen_shift_values[ pointer_shift_values[temp_prime]+i4 ]+1)%Zc) % Zc;
|
||||
// printf("var %d, i3 %d, i4 %d, index %d, Zc %d, pointer_shift_values[%d] %d gen_shift_value %d\n",var,i3,i4,index,Zc,temp_prime,pointer_shift_values[temp_prime],Gen_shift_values[pointer_shift_values[temp_prime]]);
|
||||
indlist[nind] = index;
|
||||
// printf("indlist[%d] %d, index %d\n",nind,indlist[nind],index);
|
||||
nind++;
|
||||
} //i4
|
||||
} // i3
|
||||
for (i4=0;i4<nind-1;i4++) {
|
||||
fprintf(fd,"c32[%d]^",indlist[i4]);
|
||||
} //i4
|
||||
fprintf(fd,"c32[%d];\n\n",indlist[i4]);
|
||||
fprintf(fd," break;\n");
|
||||
}// i1
|
||||
fprintf(fd,"}\n");
|
||||
|
||||
fprintf(fd,"extern \"C\" int ldpc_BG%d_Zc%d_cuda32(uint8_t *c,uint8_t *d) { \n",BG,Zc);
|
||||
|
||||
fprintf(fd,"ldpc_BG%d_Zc%d_worker%d<<<%d,%d>>>(c,d);\n",BG,Zc,i1,nrows,Zc);
|
||||
fprintf(fd," cudaDeviceSynchronize();\n");
|
||||
fprintf(fd," return(0);\n");
|
||||
fprintf(fd,"}\n");
|
||||
fclose(fd);
|
||||
fclose(fd2);
|
||||
}
|
||||
else if(gen_code==0)
|
||||
{
|
||||
@@ -241,10 +267,12 @@ int LDPCencoder(unsigned char **inputArray, unsigned char *outputArray, encoder_
|
||||
|
||||
for (i4 = 0; i4 < no_shift_values[temp_prime]; i4++) {
|
||||
channel_temp = channel_temp ^ c[i3 * Zc + Gen_shift_values[pointer_shift_values[temp_prime] + i4]];
|
||||
//if (i1==0) printf("index %d\n",i3 * Zc + Gen_shift_values[pointer_shift_values[temp_prime] + i4]);
|
||||
}
|
||||
}
|
||||
|
||||
d[i2+i1*Zc]=channel_temp;
|
||||
//if (i1==0) printf("reference: d[%d] %d c[%d] %d\n",i2,d[i2],i2,c[i2]);
|
||||
// output[t+i1*Zc]=channel_temp;
|
||||
}
|
||||
}
|
||||
|
||||
52
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder32.c
Normal file
52
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder32.c
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*!\file ldpc_encoder.c
|
||||
* \brief Defines the LDPC encoder
|
||||
* \author Florian Kaltenberger, Raymond Knopp, Kien le Trung (Eurecom)
|
||||
* \email openair_tech@eurecom.fr
|
||||
* \date 27-03-2018
|
||||
* \version 1.0
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "defs.h"
|
||||
#include "assertions.h"
|
||||
#include "openair1/PHY/CODING/nrLDPC_defs.h"
|
||||
#include "openair1/PHY/CODING/nrLDPC_extern.h"
|
||||
#include "ldpc_generate_coefficient.c"
|
||||
|
||||
|
||||
void cuda_support_init() {
|
||||
return;
|
||||
}
|
||||
int LDPCencoder32(uint8_t **input, uint32_t output[4][68*384], encoder_implemparams_t *impp)
|
||||
{
|
||||
AssertFatal(1==0,"Should not be getting here\n");
|
||||
}
|
||||
|
||||
617
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder_cuda32.c
Normal file
617
openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder_cuda32.c
Normal file
@@ -0,0 +1,617 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file ldpc_encoder_optim8segmulti.c
|
||||
* \brief Defines the optimized LDPC encoder
|
||||
* \author Florian Kaltenberger, Raymond Knopp, Kien le Trung (Eurecom)
|
||||
* \email openair_tech@eurecom.fr
|
||||
* \date 27-03-2018
|
||||
* \version 1.0
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "assertions.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "time_meas.h"
|
||||
#include "openair1/PHY/CODING/nrLDPC_defs.h"
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include "openair1/PHY/CODING/nrLDPC_extern.h"
|
||||
|
||||
#include "ldpc_encode_parity_check_cuda.c"
|
||||
#include "ldpc_generate_coefficient.c"
|
||||
|
||||
#include <cuda_runtime.h>
|
||||
|
||||
uint32_t *cc0[4];
|
||||
uint32_t *dd0[4];
|
||||
|
||||
int managed = 0, concurrent = 0, uva = 0, pageable = 0, pageable_uses_host = 0;
|
||||
|
||||
void cuda_support_init() {
|
||||
printf("We are doing the init here!\n");
|
||||
|
||||
int dev = 0;
|
||||
struct cudaDeviceProp prop;
|
||||
cudaGetDeviceProperties(&prop, dev);
|
||||
|
||||
|
||||
//cudaDeviceGetAttribute(&managed, cudaDevAttrManagedMemory, dev);
|
||||
cudaDeviceGetAttribute(&concurrent, cudaDevAttrConcurrentManagedAccess, dev);
|
||||
cudaDeviceGetAttribute(&uva, cudaDevAttrUnifiedAddressing, dev);
|
||||
cudaDeviceGetAttribute(&pageable, cudaDevAttrPageableMemoryAccess, dev);
|
||||
cudaDeviceGetAttribute(&pageable_uses_host, cudaDevAttrPageableMemoryAccessUsesHostPageTables, dev);
|
||||
|
||||
LOG_I(NR_PHY,"Device: %s (cc %d.%d)\n", prop.name, prop.major, prop.minor);
|
||||
LOG_I(NR_PHY,"Unified Virtual Addressing (UVA): %s\n", uva ? "YES" : "NO");
|
||||
//LOG_I(NR_PHY,"Managed (Unified) Memory: %s\n", managed ? "YES" : "NO");
|
||||
LOG_I(NR_PHY,"Concurrent managed access: %s\n", concurrent ? "YES" : "NO");
|
||||
LOG_I(NR_PHY,"Pageable memory access: %s\n", pageable ? "YES" : "NO");
|
||||
LOG_I(NR_PHY,"Uses host page tables: %s\n", pageable_uses_host ? "YES" : "NO");
|
||||
|
||||
// initialize input and output memory
|
||||
if (!managed) {
|
||||
printf("How you doing?\n");
|
||||
for (int i=0;i<4;i++) {
|
||||
cudaError_t err=cudaMalloc((void**)&cc0[i],22*384*sizeof(uint32_t));
|
||||
AssertFatal(err == cudaSuccess,"CUDA Error: %s\n", cudaGetErrorString(err));
|
||||
}
|
||||
}
|
||||
for (int i=0;i<4;i++) {
|
||||
cudaError_t err=cudaMalloc((void**)&dd0[i],46*384*sizeof(uint32_t));
|
||||
AssertFatal(err == cudaSuccess,"CUDA Error: %s\n", cudaGetErrorString(err));
|
||||
}
|
||||
}
|
||||
|
||||
int LDPCencoder32(uint8_t **input, uint32_t output[4][68*384], encoder_implemparams_t *impp)
|
||||
{
|
||||
//set_log(PHY, 4);
|
||||
|
||||
int Zc = impp->Zc;
|
||||
int Kb = impp->Kb;
|
||||
short block_length = impp->K;
|
||||
short BG = impp->BG;
|
||||
int nrows=0,ncols=0;
|
||||
int rate=3;
|
||||
int no_punctured_columns,removed_bit;
|
||||
|
||||
if(impp->tinput != NULL) start_meas(impp->tinput);
|
||||
//determine number of bits in codeword
|
||||
if (BG==1)
|
||||
{
|
||||
nrows=46; //parity check bits
|
||||
ncols=22; //info bits
|
||||
rate=3;
|
||||
}
|
||||
else if (BG==2)
|
||||
{
|
||||
nrows=42; //parity check bits
|
||||
ncols=10; // info bits
|
||||
rate=5;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_LDPC
|
||||
LOG_I(PHY,"ldpc_encoder_cuda32: BG %d, Zc %d, Kb %d, block_length %d, segments %d\n",BG,Zc,Kb,block_length,impp->n_segments);
|
||||
LOG_I(PHY,"ldpc_encoder_cuda32: PDU (seg 0) %x %x %x %x\n",input[0][0],input[0][1],input[0][2],input[0][3]);
|
||||
#endif
|
||||
|
||||
AssertFatal(Zc > 0, "no valid Zc found for block length %d\n", block_length);
|
||||
|
||||
int n_inputs = (impp->n_segments/32)+(((impp->n_segments&31) > 0) ? 1: 0);
|
||||
uint32_t cc[4][22*Zc]; //padded input, unpacked, max size
|
||||
|
||||
// calculate number of punctured bits
|
||||
no_punctured_columns=(int)((nrows-2)*Zc+block_length-block_length*rate)/Zc;
|
||||
removed_bit=(nrows-no_punctured_columns-2) * Zc+block_length-(int)(block_length*rate);
|
||||
// clear input
|
||||
for (int i=0;i<n_inputs;i++) {
|
||||
memset(cc[i],0,22*Zc*sizeof(uint32_t));
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
// unoptimized version of input processing
|
||||
for (; i_dword < block_length; i_dword++) {
|
||||
unsigned int i = i_dword;
|
||||
for (int j = 0; j < impp->n_segments; j++) {
|
||||
|
||||
temp = (input[j][i/8]&(128>>(i&7)))>>(7-(i&7));
|
||||
cc[j>>5][i] |= (temp << (j&31));
|
||||
}
|
||||
}
|
||||
#else
|
||||
#ifdef __AVX2__
|
||||
|
||||
#else
|
||||
int i2=0;
|
||||
const int32_t ucShifta[32][4] = {
|
||||
{-7,-6,-5,-4}, // 0
|
||||
{-6,-5,-4,-3}, // 1
|
||||
{-5,-4,-3,-2}, // 2
|
||||
{-4,-3,-2,-1}, // 3
|
||||
{-3,-2,-1,0}, // 4
|
||||
{-2,-1,0,1}, // 5
|
||||
{-1,0,1,2}, // 6
|
||||
{0,1,2,3}, // 7
|
||||
{1,2,3,4}, // 8
|
||||
{2,3,4,5}, // 9
|
||||
{3,4,5,6}, // 10
|
||||
{4,5,6,7}, // 11
|
||||
{5,6,7,8}, // 12
|
||||
{6,7,8,9}, // 13
|
||||
{7,8,9,10}, // 14
|
||||
{8,9,10,11}, // 15
|
||||
{9,10,11,12}, // 16
|
||||
{10,11,12,13}, // 17
|
||||
{11,12,13,14}, // 18
|
||||
{12,13,14,15}, // 19
|
||||
{13,14,15,16}, // 20
|
||||
{14,15,16,17}, // 21
|
||||
{15,16,17,18}, // 22
|
||||
{16,17,18,19}, // 23
|
||||
{17,18,19,20}, // 24
|
||||
{18,19,20,21}, // 25
|
||||
{19,20,21,22}, // 26
|
||||
{20,21,22,23}, // 27
|
||||
{21,22,23,24}, // 28
|
||||
{22,23,24,25}, // 29
|
||||
{23,24,25,26}, // 30
|
||||
{24,25,26,27}}; // 31
|
||||
const int32_t ucShiftb[32][4] = {
|
||||
{-3,-2,-1,0}, // 0
|
||||
{-2,-1,0,1}, // 1
|
||||
{-1,0,1,2}, // 2
|
||||
{0,1,2,3}, // 3
|
||||
{1,2,3,4}, // 4
|
||||
{2,3,4,5}, // 5
|
||||
{3,4,5,6}, // 6
|
||||
{4,5,6,7}, // 7
|
||||
{5,6,7,8}, // 8
|
||||
{6,7,8,9}, // 9
|
||||
{7,8,9,10}, // 10
|
||||
{8,9,10,11}, // 11
|
||||
{9,10,11,12}, // 12
|
||||
{10,11,12,13}, // 13
|
||||
{11,12,13,14}, // 14
|
||||
{12,13,14,15}, // 15
|
||||
{13,14,15,16}, // 16
|
||||
{14,15,16,17}, // 17
|
||||
{15,16,17,18}, // 18
|
||||
{16,17,18,19}, // 19
|
||||
{17,18,19,20}, // 20
|
||||
{18,19,20,21}, // 21
|
||||
{19,20,21,22}, // 22
|
||||
{20,21,22,23}, // 23
|
||||
{21,22,23,24}, // 24
|
||||
{22,23,24,25}, // 25
|
||||
{23,24,25,26}, // 26
|
||||
{24,25,26,27}, // 27
|
||||
{25,26,27,28}, // 28
|
||||
{26,27,28,29}, // 29
|
||||
{27,28,29,30}, // 30
|
||||
{28,29,30,31}}; // 31
|
||||
|
||||
const int32_t ucShiftc[32][4] = {
|
||||
{-15,-14,-13,-12}, // 0
|
||||
{-14,-13,-12,-11}, // 1
|
||||
{-13,-12,-11,-10}, // 2
|
||||
{-12,-11,-10,-9}, // 3
|
||||
{-11,-10,-9,-8}, // 4
|
||||
{-10,-9,-8,-7}, // 5
|
||||
{-9,-8,-7,-6}, // 6
|
||||
{-8,-7,-6,-5}, // 7
|
||||
{-7,-6,-5,-4}, // 8
|
||||
{-6,-5,-4,-3}, // 9
|
||||
{-5,-4,-3,-2}, // 10
|
||||
{-4,-3,-2,-1}, // 11
|
||||
{-3,-2,-1,0}, // 12
|
||||
{-2,-1,0,1}, // 13
|
||||
{-1,0,1,2}, // 14
|
||||
{0,1,2,3}, // 15
|
||||
{1,2,3,4}, // 16
|
||||
{2,3,4,5}, // 17
|
||||
{3,4,5,6}, // 18
|
||||
{4,5,6,7}, // 19
|
||||
{5,6,7,8}, // 20
|
||||
{6,7,8,9}, // 21
|
||||
{7,8,9,10}, // 22
|
||||
{8,9,10,11}, // 23
|
||||
{9,10,11,12}, // 24
|
||||
{10,11,12,13}, // 25
|
||||
{11,12,13,14}, // 26
|
||||
{12,13,14,15}, // 27
|
||||
{13,14,15,16}, // 28
|
||||
{14,15,16,17}, // 29
|
||||
{15,16,17,18}, // 30
|
||||
{16,17,18,19}}; // 31
|
||||
const int32_t ucShiftd[32][4] = {
|
||||
{-11,-10,-9,-8}, // 0
|
||||
{-10,-9,-8,-7}, // 1
|
||||
{-9,-8,-7,-6}, // 2
|
||||
{-8,-7,-6,-5}, // 3
|
||||
{-7,-6,-5,-4}, // 4
|
||||
{-6,-5,-4,-3}, // 5
|
||||
{-5,-4,-3,-2}, // 6
|
||||
{-4,-3,-2,-1}, // 7
|
||||
{-3,-2,-1,0}, // 8
|
||||
{-2,-1,0,1}, // 9
|
||||
{-1,0,1,2}, // 10
|
||||
{0,1,2,3}, // 11
|
||||
{1,2,3,4}, // 12
|
||||
{2,3,4,5}, // 13
|
||||
{3,4,5,6}, // 14
|
||||
{4,5,6,7}, // 15
|
||||
{5,6,7,8}, // 16
|
||||
{6,7,8,9}, // 17
|
||||
{7,8,9,10}, // 18
|
||||
{8,9,10,11}, // 19
|
||||
{9,10,11,12}, // 20
|
||||
{10,11,12,13}, // 21
|
||||
{11,12,13,14}, // 22
|
||||
{12,13,14,15}, // 23
|
||||
{13,14,15,16}, // 24
|
||||
{14,15,16,17}, // 25
|
||||
{15,16,17,18}, // 26
|
||||
{16,17,18,19}, // 27
|
||||
{17,18,19,20}, // 28
|
||||
{18,19,20,21}, // 29
|
||||
{19,20,21,22}, // 30
|
||||
{20,21,22,23}};// 31
|
||||
|
||||
const int32_t ucShifte[32][4] = {
|
||||
{-23,-22,-21,-20}, // 0
|
||||
{-22,-21,-20,-19}, // 1
|
||||
{-21,-20,-19,-18}, // 2
|
||||
{-20,-19,-18,-17}, // 3
|
||||
{-19,-18,-17,-16}, // 4
|
||||
{-18,-17,-16,-15}, // 5
|
||||
{-17,-16,-15,-14}, // 6
|
||||
{-16,-15,-14,-13}, // 7
|
||||
{-15,-14,-13,-12}, // 8
|
||||
{-14,-13,-12,-11}, // 9
|
||||
{-13,-12,-11,-10}, // 10
|
||||
{-12,-11,-10,-9}, // 11
|
||||
{-11,-10,-9,-8}, // 12
|
||||
{-10,-9,-8,-7}, // 13
|
||||
{-9,-8,-7,-6}, // 14
|
||||
{-8,-7,-6,-5}, // 15
|
||||
{-7,-6,-5,-4}, // 16
|
||||
{-6,-5,-4,-3}, // 17
|
||||
{-5,-4,-3,-2}, // 18
|
||||
{-4,-3,-2,-1}, // 19
|
||||
{-3,-2,-1,0}, // 20
|
||||
{-2,-1,0,1}, // 21
|
||||
{-1,0,1,2}, // 22
|
||||
{0,1,2,3}, // 23
|
||||
{1,2,3,4}, // 24
|
||||
{2,3,4,5}, // 25
|
||||
{3,4,5,6}, // 26
|
||||
{4,5,6,7}, // 27
|
||||
{5,6,7,8}, // 28
|
||||
{6,7,8,9}, // 29
|
||||
{7,8,9,10}, // 30
|
||||
{8,9,10,11}}; // 31
|
||||
|
||||
const int32_t ucShiftf[32][4] = {
|
||||
{-19,-18,-17,-16}, // 0
|
||||
{-18,-17,-16,-15}, // 1
|
||||
{-17,-16,-15,-14}, // 2
|
||||
{-16,-15,-14,-13}, // 3
|
||||
{-15,-14,-13,-12}, // 4
|
||||
{-14,-13,-12,-11}, // 5
|
||||
{-13,-12,-11,-10}, // 6
|
||||
{-12,-11,-10,-9}, // 7
|
||||
{-11,-10,-9,-8}, // 8
|
||||
{-10,-9,-8,-7}, // 9
|
||||
{-9,-8,-7,-6}, // 10
|
||||
{-8,-7,-6,-5}, // 11
|
||||
{-7,-6,-5,-4}, // 12
|
||||
{-6,-5,-4,-3}, // 13
|
||||
{-5,-4,-3,-2}, // 14
|
||||
{-4,-3,-2,-1}, // 15
|
||||
{-3,-2,-1,0}, // 16
|
||||
{-2,-1,0,1}, // 17
|
||||
{-1,0,1,2}, // 18
|
||||
{0,1,2,3}, // 19
|
||||
{1,2,3,4}, // 20
|
||||
{2,3,4,5}, // 21
|
||||
{3,4,5,6}, // 22
|
||||
{4,5,6,7}, // 23
|
||||
{5,6,7,8}, // 24
|
||||
{6,7,8,9}, // 25
|
||||
{7,8,9,10}, // 26
|
||||
{8,9,10,11}, // 27
|
||||
{9,10,11,12}, // 28
|
||||
{10,11,12,13}, // 29
|
||||
{11,12,13,14}, // 30
|
||||
{12,13,14,15}}; // 31
|
||||
|
||||
const int32_t ucShiftg[32][4] = {
|
||||
{-31,-30,-29,-28},
|
||||
{-30,-29,-28,-27},
|
||||
{-29,-28,-27,-26},
|
||||
{-28,-27,-26,-25},
|
||||
{-27,-26,-25,-24},
|
||||
{-26,-25,-24,-23},
|
||||
{-25,-24,-23,-22},
|
||||
{-24,-23,-22,-21},
|
||||
{-23,-22,-21,-20}, // 0
|
||||
{-22,-21,-20,-19}, // 1
|
||||
{-21,-20,-19,-18}, // 2
|
||||
{-20,-19,-18,-17}, // 3
|
||||
{-19,-18,-17,-16}, // 4
|
||||
{-18,-17,-16,-15}, // 5
|
||||
{-17,-16,-15,-14}, // 6
|
||||
{-16,-15,-14,-13}, // 7
|
||||
{-15,-14,-13,-12}, // 8
|
||||
{-14,-13,-12,-11}, // 9
|
||||
{-13,-12,-11,-10}, // 10
|
||||
{-12,-11,-10,-9}, // 11
|
||||
{-11,-10,-9,-8}, // 12
|
||||
{-10,-9,-8,-7}, // 13
|
||||
{-9,-8,-7,-6}, // 14
|
||||
{-8,-7,-6,-5}, // 15
|
||||
{-7,-6,-5,-4}, // 16
|
||||
{-6,-5,-4,-3}, // 17
|
||||
{-5,-4,-3,-2}, // 18
|
||||
{-4,-3,-2,-1}, // 19
|
||||
{-3,-2,-1,0}, // 20
|
||||
{-2,-1,0,1}, // 21
|
||||
{-1,0,1,2}, // 22
|
||||
{0,1,2,3}}; // 23
|
||||
|
||||
const int32_t ucShifth[32][4] = {
|
||||
{-27,-26,-25,-24}, // 0
|
||||
{-26,-25,-24,-23}, // 1
|
||||
{-25,-24,-23,-22}, // 2
|
||||
{-24,-23,-22,-21}, // 3
|
||||
{-23,-22,-21,-20}, // 4
|
||||
{-22,-21,-20,-19}, // 5
|
||||
{-21,-20,-19,-18}, // 6
|
||||
{-20,-19,-18,-17}, // 7
|
||||
{-19,-18,-17,-16}, // 8
|
||||
{-18,-17,-16,-15}, // 9
|
||||
{-17,-16,-15,-14}, // 10
|
||||
{-16,-15,-14,-13}, // 11
|
||||
{-15,-14,-13,-12}, // 12
|
||||
{-14,-13,-12,-11}, // 13
|
||||
{-13,-12,-11,-10}, // 14
|
||||
{-12,-11,-10,-9}, // 15
|
||||
{-11,-10,-9,-8}, // 16
|
||||
{-10,-9,-8,-7}, // 17
|
||||
{-9,-8,-7,-6}, // 18
|
||||
{-8,-7,-6,-5}, // 19
|
||||
{-7,-6,-5,-4}, // 20
|
||||
{-6,-5,-4,-3}, // 21
|
||||
{-5,-4,-3,-2}, // 22
|
||||
{-4,-3,-2,-1}, // 23
|
||||
{-3,-2,-1,0}, // 24
|
||||
{-2,-1,0,1}, // 25
|
||||
{-1,0,1,2}, // 26
|
||||
{0,1,2,3}, // 27
|
||||
{1,2,3,4}, // 28
|
||||
{2,3,4,5}, // 29
|
||||
{3,4,5,6}, // 30
|
||||
{4,5,6,7}}; // 31
|
||||
const uint32_t __attribute__ ((aligned (16))) masksa[4] = {0x80,0x40,0x20,0x10};
|
||||
const uint32_t __attribute__ ((aligned (16))) masksb[4] = {0x8,0x4,0x2,0x1};
|
||||
const uint32_t __attribute__ ((aligned (16))) masksc[4] = {0x8000,0x4000,0x2000,0x1000};
|
||||
const uint32_t __attribute__ ((aligned (16))) masksd[4] = {0x800,0x400,0x200,0x100};
|
||||
const uint32_t __attribute__ ((aligned (16))) maskse[4] = {0x800000,0x400000,0x200000,0x100000};
|
||||
const uint32_t __attribute__ ((aligned (16))) masksf[4] = {0x80000,0x40000,0x20000,0x10000};
|
||||
const uint32_t __attribute__ ((aligned (16))) masksg[4] = {0x80000000,0x40000000,0x20000000,0x10000000};
|
||||
const uint32_t __attribute__ ((aligned (16))) masksh[4] = {0x8000000,0x4000000,0x2000000,0x1000000};
|
||||
int32x4_t vshifta[32],vshiftb[32],vshiftc[32],vshiftd[32],vshifte[32],vshiftf[32],vshiftg[32],vshifth[32];
|
||||
uint32x4_t vmasksa = vld1q_u32(masksa);
|
||||
uint32x4_t vmasksb = vld1q_u32(masksb);
|
||||
uint32x4_t vmasksc = vld1q_u32(masksc);
|
||||
uint32x4_t vmasksd = vld1q_u32(masksd);
|
||||
uint32x4_t vmaskse = vld1q_u32(maskse);
|
||||
uint32x4_t vmasksf = vld1q_u32(masksf);
|
||||
uint32x4_t vmasksg = vld1q_u32(masksg);
|
||||
uint32x4_t vmasksh = vld1q_u32(masksh);
|
||||
uint32x4_t in;
|
||||
|
||||
for (int n=0;n<32;n++) {
|
||||
vshifta[n] = vld1q_s32(ucShifta[n]);
|
||||
vshiftb[n] = vld1q_s32(ucShiftb[n]);
|
||||
vshiftc[n] = vld1q_s32(ucShiftc[n]);
|
||||
vshiftd[n] = vld1q_s32(ucShiftd[n]);
|
||||
vshifte[n] = vld1q_s32(ucShifte[n]);
|
||||
vshiftf[n] = vld1q_s32(ucShiftf[n]);
|
||||
vshiftg[n] = vld1q_s32(ucShiftg[n]);
|
||||
vshifth[n] = vld1q_s32(ucShifth[n]);
|
||||
}
|
||||
i2=0;
|
||||
int j0=0,j1=0,j2=0,j3=0;
|
||||
if (impp->n_segments <= 32) {
|
||||
j0=impp->n_segments;
|
||||
}
|
||||
else if (impp->n_segments <= 64) {
|
||||
j0=32;
|
||||
j1=impp->n_segments-32;
|
||||
}
|
||||
else if (impp->n_segments <= 96) {
|
||||
j0=32; j1=32;
|
||||
j2=impp->n_segments-64;
|
||||
}
|
||||
else if (impp->n_segments <= 128) {
|
||||
j0=32; j1=32; j2=32;
|
||||
j3=impp->n_segments-96;
|
||||
}
|
||||
uint32x4_t *ccp,cc0,cc1,cc2,cc3,cc4,cc5,cc6,cc7;
|
||||
for (int i=0; i < (block_length>>5); i++,i2+=8) {
|
||||
in = vdupq_n_u32(((uint32_t*)input[0])[i]);
|
||||
cc0 = vshlq_u32(vandq_u32(in,vmasksa),vshifta[0]);
|
||||
cc1 = vshlq_u32(vandq_u32(in,vmasksb),vshiftb[0]);
|
||||
cc2 = vshlq_u32(vandq_u32(in,vmasksc),vshiftc[0]);
|
||||
cc3 = vshlq_u32(vandq_u32(in,vmasksd),vshiftd[0]);
|
||||
cc4 = vshlq_u32(vandq_u32(in,vmaskse),vshifte[0]);
|
||||
cc5 = vshlq_u32(vandq_u32(in,vmasksf),vshiftf[0]);
|
||||
cc6 = vshlq_u32(vandq_u32(in,vmasksg),vshiftg[0]);
|
||||
cc7 = vshlq_u32(vandq_u32(in,vmasksh),vshifth[0]);
|
||||
for (int j = 1; j < j0; j++) {
|
||||
in = vdupq_n_u32(((uint32_t*)input[j])[i]);
|
||||
cc0 = vorrq_u32(cc0,vshlq_u32(vandq_u32(in,vmasksa),vshifta[j]));
|
||||
cc1 = vorrq_u32(cc1,vshlq_u32(vandq_u32(in,vmasksb),vshiftb[j]));
|
||||
cc2 = vorrq_u32(cc2,vshlq_u32(vandq_u32(in,vmasksc),vshiftc[j]));
|
||||
cc3 = vorrq_u32(cc3,vshlq_u32(vandq_u32(in,vmasksd),vshiftd[j]));
|
||||
cc4 = vorrq_u32(cc4,vshlq_u32(vandq_u32(in,vmaskse),vshifte[j]));
|
||||
cc5 = vorrq_u32(cc5,vshlq_u32(vandq_u32(in,vmasksf),vshiftf[j]));
|
||||
cc6 = vorrq_u32(cc6,vshlq_u32(vandq_u32(in,vmasksg),vshiftg[j]));
|
||||
cc7 = vorrq_u32(cc7,vshlq_u32(vandq_u32(in,vmasksh),vshifth[j]));
|
||||
}
|
||||
ccp=&((uint32x4_t *)cc[0])[i2];
|
||||
ccp[0] = cc0;
|
||||
ccp[1] = cc1;
|
||||
ccp[2] = cc2;
|
||||
ccp[3] = cc3;
|
||||
ccp[4] = cc4;
|
||||
ccp[5] = cc5;
|
||||
ccp[6] = cc6;
|
||||
ccp[7] = cc7;
|
||||
if (j1>0) {
|
||||
in = vdupq_n_u32(((uint32_t*)input[32])[i]);
|
||||
cc0 = vshlq_u32(vandq_u32(in,vmasksa),vshifta[0]);
|
||||
cc1 = vshlq_u32(vandq_u32(in,vmasksb),vshiftb[0]);
|
||||
cc2 = vshlq_u32(vandq_u32(in,vmasksc),vshiftc[0]);
|
||||
cc3 = vshlq_u32(vandq_u32(in,vmasksd),vshiftd[0]);
|
||||
cc4 = vshlq_u32(vandq_u32(in,vmaskse),vshifte[0]);
|
||||
cc5 = vshlq_u32(vandq_u32(in,vmasksf),vshiftf[0]);
|
||||
cc6 = vshlq_u32(vandq_u32(in,vmasksg),vshiftg[0]);
|
||||
cc7 = vshlq_u32(vandq_u32(in,vmasksh),vshifth[0]);
|
||||
for (int j = 1; j < j1; j++) {
|
||||
in = vdupq_n_u32(((uint32_t*)input[32+j])[i]);
|
||||
cc0 = vorrq_u32(cc0,vshlq_u32(vandq_u32(in,vmasksa),vshifta[j]));
|
||||
cc1 = vorrq_u32(cc1,vshlq_u32(vandq_u32(in,vmasksb),vshiftb[j]));
|
||||
cc2 = vorrq_u32(cc2,vshlq_u32(vandq_u32(in,vmasksc),vshiftc[j]));
|
||||
cc3 = vorrq_u32(cc3,vshlq_u32(vandq_u32(in,vmasksd),vshiftd[j]));
|
||||
cc4 = vorrq_u32(cc4,vshlq_u32(vandq_u32(in,vmaskse),vshifte[j]));
|
||||
cc5 = vorrq_u32(cc5,vshlq_u32(vandq_u32(in,vmasksf),vshiftf[j]));
|
||||
cc6 = vorrq_u32(cc6,vshlq_u32(vandq_u32(in,vmasksg),vshiftg[j]));
|
||||
cc7 = vorrq_u32(cc7,vshlq_u32(vandq_u32(in,vmasksh),vshifth[j]));
|
||||
}
|
||||
ccp=&((uint32x4_t *)cc[1])[i2];
|
||||
ccp[0] = cc0;
|
||||
ccp[1] = cc1;
|
||||
ccp[2] = cc2;
|
||||
ccp[3] = cc3;
|
||||
ccp[4] = cc4;
|
||||
ccp[5] = cc5;
|
||||
ccp[6] = cc6;
|
||||
ccp[7] = cc7;
|
||||
}
|
||||
if (j2>0) {
|
||||
in = vdupq_n_u32(((uint32_t*)input[64])[i]);
|
||||
cc0 = vshlq_u32(vandq_u32(in,vmasksa),vshifta[0]);
|
||||
cc1 = vshlq_u32(vandq_u32(in,vmasksb),vshiftb[0]);
|
||||
cc2 = vshlq_u32(vandq_u32(in,vmasksc),vshiftc[0]);
|
||||
cc3 = vshlq_u32(vandq_u32(in,vmasksd),vshiftd[0]);
|
||||
cc4 = vshlq_u32(vandq_u32(in,vmaskse),vshifte[0]);
|
||||
cc5 = vshlq_u32(vandq_u32(in,vmasksf),vshiftf[0]);
|
||||
cc6 = vshlq_u32(vandq_u32(in,vmasksg),vshiftg[0]);
|
||||
cc7 = vshlq_u32(vandq_u32(in,vmasksh),vshifth[0]);
|
||||
for (int j = 1; j < j2; j++) {
|
||||
in = vdupq_n_u32(((uint32_t*)input[64+j])[i]);
|
||||
cc0 = vorrq_u32(cc0,vshlq_u32(vandq_u32(in,vmasksa),vshifta[j]));
|
||||
cc1 = vorrq_u32(cc1,vshlq_u32(vandq_u32(in,vmasksb),vshiftb[j]));
|
||||
cc2 = vorrq_u32(cc2,vshlq_u32(vandq_u32(in,vmasksc),vshiftc[j]));
|
||||
cc3 = vorrq_u32(cc3,vshlq_u32(vandq_u32(in,vmasksd),vshiftd[j]));
|
||||
cc4 = vorrq_u32(cc4,vshlq_u32(vandq_u32(in,vmaskse),vshifte[j]));
|
||||
cc5 = vorrq_u32(cc5,vshlq_u32(vandq_u32(in,vmasksf),vshiftf[j]));
|
||||
cc6 = vorrq_u32(cc6,vshlq_u32(vandq_u32(in,vmasksg),vshiftg[j]));
|
||||
cc7 = vorrq_u32(cc7,vshlq_u32(vandq_u32(in,vmasksh),vshifth[j]));
|
||||
}
|
||||
ccp=&((uint32x4_t *)cc[2])[i2];
|
||||
ccp[0] = cc0;
|
||||
ccp[1] = cc1;
|
||||
ccp[2] = cc2;
|
||||
ccp[3] = cc3;
|
||||
ccp[4] = cc4;
|
||||
ccp[5] = cc5;
|
||||
ccp[6] = cc6;
|
||||
ccp[7] = cc7;
|
||||
}
|
||||
if (j3>0) {
|
||||
in = vdupq_n_u32(((uint32_t*)input[96])[i]);
|
||||
cc0 = vshlq_u32(vandq_u32(in,vmasksa),vshifta[0]);
|
||||
cc1 = vshlq_u32(vandq_u32(in,vmasksb),vshiftb[0]);
|
||||
cc2 = vshlq_u32(vandq_u32(in,vmasksc),vshiftc[0]);
|
||||
cc3 = vshlq_u32(vandq_u32(in,vmasksd),vshiftd[0]);
|
||||
cc4 = vshlq_u32(vandq_u32(in,vmaskse),vshifte[0]);
|
||||
cc5 = vshlq_u32(vandq_u32(in,vmasksf),vshiftf[0]);
|
||||
cc6 = vshlq_u32(vandq_u32(in,vmasksg),vshiftg[0]);
|
||||
cc7 = vshlq_u32(vandq_u32(in,vmasksh),vshifth[0]);
|
||||
for (int j = 1; j < j3; j++) {
|
||||
in = vdupq_n_u32(((uint32_t*)input[96+j])[i]);
|
||||
cc0 = vorrq_u32(cc0,vshlq_u32(vandq_u32(in,vmasksa),vshifta[j]));
|
||||
cc1 = vorrq_u32(cc1,vshlq_u32(vandq_u32(in,vmasksb),vshiftb[j]));
|
||||
cc2 = vorrq_u32(cc2,vshlq_u32(vandq_u32(in,vmasksc),vshiftc[j]));
|
||||
cc3 = vorrq_u32(cc3,vshlq_u32(vandq_u32(in,vmasksd),vshiftd[j]));
|
||||
cc4 = vorrq_u32(cc4,vshlq_u32(vandq_u32(in,vmaskse),vshifte[j]));
|
||||
cc5 = vorrq_u32(cc5,vshlq_u32(vandq_u32(in,vmasksf),vshiftf[j]));
|
||||
cc6 = vorrq_u32(cc6,vshlq_u32(vandq_u32(in,vmasksg),vshiftg[j]));
|
||||
cc7 = vorrq_u32(cc7,vshlq_u32(vandq_u32(in,vmasksh),vshifth[j]));
|
||||
}
|
||||
ccp=&((uint32x4_t *)cc[3])[i2];
|
||||
ccp[0] = cc0;
|
||||
ccp[1] = cc1;
|
||||
ccp[2] = cc2;
|
||||
ccp[3] = cc3;
|
||||
ccp[4] = cc4;
|
||||
ccp[5] = cc5;
|
||||
ccp[6] = cc6;
|
||||
ccp[7] = cc7;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
if(impp->tinput != NULL) stop_meas(impp->tinput);
|
||||
|
||||
if (BG==1 && Zc==384) {
|
||||
//parity check part
|
||||
if(impp->tparity != NULL) start_meas(impp->tparity);
|
||||
uint32_t *ccp[n_inputs];
|
||||
for (int s=0;s<n_inputs;s++) {
|
||||
ccp[s]=cc[s];
|
||||
}
|
||||
encode_parity_check_part_cuda(ccp, dd0, BG, Zc, Kb, ncols,n_inputs);
|
||||
if(impp->tparity != NULL) stop_meas(impp->tparity);
|
||||
}
|
||||
else {
|
||||
AssertFatal(1==0,"Only BG1 Zc=384 for now\n");
|
||||
}
|
||||
|
||||
|
||||
if(impp->toutput != NULL) start_meas(impp->toutput);
|
||||
for (int s=0;s<n_inputs;s++) {
|
||||
memcpy(output[s],&cc[s][2*Zc],sizeof(uint32_t)*(block_length-(2*Zc)));
|
||||
cudaError_t err = cudaMemcpy(&output[s][block_length-(2*Zc)],dd0[s],sizeof(uint32_t)*((nrows-no_punctured_columns) * Zc-removed_bit),2);
|
||||
AssertFatal(err == cudaSuccess, "dd0[%d] %p CUDA Error: %s\n", s, dd0[s],cudaGetErrorString(err));
|
||||
}
|
||||
if(impp->toutput != NULL) stop_meas(impp->toutput);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -43,6 +43,10 @@
|
||||
#include "ldpc_encode_parity_check.c"
|
||||
#include "ldpc_generate_coefficient.c"
|
||||
|
||||
void ini_input32_luts() {
|
||||
return;
|
||||
}
|
||||
|
||||
int LDPCencoder(uint8_t **input, uint8_t *output, encoder_implemparams_t *impp)
|
||||
{
|
||||
//set_log(PHY, 4);
|
||||
@@ -193,9 +197,6 @@ int LDPCencoder(uint8_t **input, uint8_t *output, encoder_implemparams_t *impp)
|
||||
if(impp->tinput != NULL) stop_meas(impp->tinput);
|
||||
|
||||
if ((BG==1 && Zc>=176) || (BG==2 && Zc>=72)) {
|
||||
// extend matrix
|
||||
if(impp->tprep != NULL) start_meas(impp->tprep);
|
||||
if(impp->tprep != NULL) stop_meas(impp->tprep);
|
||||
//parity check part
|
||||
if(impp->tparity != NULL) start_meas(impp->tparity);
|
||||
encode_parity_check_part_optim(cc, dd, BG, Zc, Kb, simd_size, ncols);
|
||||
@@ -207,8 +208,10 @@ int LDPCencoder(uint8_t **input, uint8_t *output, encoder_implemparams_t *impp)
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
if(impp->toutput != NULL) start_meas(impp->toutput);
|
||||
memcpy(output,&cc[2*Zc],(block_length-(2*Zc)));
|
||||
memcpy(output+block_length-(2*Zc),dd,((nrows-no_punctured_columns) * Zc-removed_bit));
|
||||
if(impp->toutput != NULL) stop_meas(impp->toutput);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ typedef struct ldpc_interface_s {
|
||||
LDPC_shutdownfunc_t *LDPCshutdown;
|
||||
LDPC_decoderfunc_t *LDPCdecoder;
|
||||
LDPC_encoderfunc_t *LDPCencoder;
|
||||
LDPC_encoderfunc32_t *LDPCencoder32;
|
||||
} ldpc_interface_t;
|
||||
|
||||
// Global var to limit the rework of the dirty legacy code
|
||||
@@ -42,6 +43,7 @@ LDPC_initfunc_t LDPCinit;
|
||||
LDPC_shutdownfunc_t LDPCshutdown;
|
||||
LDPC_decoderfunc_t LDPCdecoder;
|
||||
LDPC_encoderfunc_t LDPCencoder;
|
||||
LDPC_encoderfunc32_t LDPCencoder32;
|
||||
|
||||
// inline functions:
|
||||
#endif
|
||||
|
||||
@@ -56,14 +56,17 @@ int load_LDPClib(char *version, ldpc_interface_t *itf)
|
||||
loader_shlibfunc_t shlib_fdesc[] = {{.fname = "LDPCinit"},
|
||||
{.fname = "LDPCshutdown"},
|
||||
{.fname = "LDPCdecoder"},
|
||||
{.fname = "LDPCencoder"}};
|
||||
{.fname = "LDPCencoder"},
|
||||
{.fname = "LDPCencoder32"}};
|
||||
int ret;
|
||||
ret = load_module_version_shlib(libname, version, shlib_fdesc, sizeofArray(shlib_fdesc), NULL);
|
||||
AssertFatal((ret >= 0), "Error loading ldpc decoder");
|
||||
LOG_I(NR_PHY,"loading LDPC version %s\n",version);
|
||||
itf->LDPCinit = (LDPC_initfunc_t *)shlib_fdesc[0].fptr;
|
||||
itf->LDPCshutdown = (LDPC_shutdownfunc_t *)shlib_fdesc[1].fptr;
|
||||
itf->LDPCdecoder = (LDPC_decoderfunc_t *)shlib_fdesc[2].fptr;
|
||||
itf->LDPCencoder = (LDPC_encoderfunc_t *)shlib_fdesc[3].fptr;
|
||||
itf->LDPCencoder32 = (LDPC_encoderfunc32_t *)shlib_fdesc[4].fptr;
|
||||
|
||||
AssertFatal(itf->LDPCinit() == 0, "error starting LDPC library %s %s\n", libname, version);
|
||||
|
||||
|
||||
@@ -779,6 +779,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot)
|
||||
time_stats_t *tprep = &gNB->tprep;
|
||||
time_stats_t *tparity = &gNB->tparity;
|
||||
time_stats_t *toutput = &gNB->toutput;
|
||||
time_stats_t *tconcat = &gNB->tconcat;
|
||||
time_stats_t *dlsch_rate_matching_stats = &gNB->dlsch_rate_matching_stats;
|
||||
time_stats_t *dlsch_interleaving_stats = &gNB->dlsch_interleaving_stats;
|
||||
time_stats_t *dlsch_segmentation_stats = &gNB->dlsch_segmentation_stats;
|
||||
@@ -826,7 +827,6 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot)
|
||||
|
||||
unsigned char output[size_output >> 3] __attribute__((aligned(64)));
|
||||
bzero(output, sizeof(output));
|
||||
|
||||
start_meas(dlsch_encoding_stats);
|
||||
if (nr_dlsch_encoding(gNB,
|
||||
msgTx,
|
||||
@@ -838,12 +838,14 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot)
|
||||
tprep,
|
||||
tparity,
|
||||
toutput,
|
||||
tconcat,
|
||||
dlsch_rate_matching_stats,
|
||||
dlsch_interleaving_stats,
|
||||
dlsch_segmentation_stats)
|
||||
== -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
stop_meas(dlsch_encoding_stats);
|
||||
|
||||
unsigned char *output_ptr = output;
|
||||
|
||||
@@ -54,7 +54,8 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
||||
time_stats_t *toutput,
|
||||
time_stats_t *dlsch_rate_matching_stats,
|
||||
time_stats_t *dlsch_interleaving_stats,
|
||||
time_stats_t *dlsch_segmentation_stats);
|
||||
time_stats_t *dlsch_segmentation_stats,
|
||||
time_stats_t *dlsch_output_stats);
|
||||
|
||||
void dump_pdsch_stats(FILE *fd,PHY_VARS_gNB *gNB);
|
||||
|
||||
|
||||
@@ -116,6 +116,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
||||
time_stats_t *tprep,
|
||||
time_stats_t *tparity,
|
||||
time_stats_t *toutput,
|
||||
time_stats_t *tconcat,
|
||||
time_stats_t *dlsch_rate_matching_stats,
|
||||
time_stats_t *dlsch_interleaving_stats,
|
||||
time_stats_t *dlsch_segmentation_stats)
|
||||
@@ -132,6 +133,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
||||
.tprep = tprep,
|
||||
.tparity = tparity,
|
||||
.toutput = toutput,
|
||||
.tconcat = tconcat,
|
||||
.TBs = TBs};
|
||||
|
||||
int num_segments = 0;
|
||||
|
||||
@@ -506,6 +506,7 @@ typedef struct PHY_VARS_gNB_s {
|
||||
time_stats_t tprep;
|
||||
time_stats_t tparity;
|
||||
time_stats_t toutput;
|
||||
time_stats_t tconcat;
|
||||
|
||||
time_stats_t dlsch_rate_matching_stats;
|
||||
time_stats_t dlsch_interleaving_stats;
|
||||
|
||||
@@ -81,8 +81,6 @@
|
||||
#define bzero(s,n) (memset((s),0,(n)))
|
||||
/// suppress compiler warning for unused arguments
|
||||
#define UNUSED(x) (void)x;
|
||||
#define NUM_DL_ACTORS 4
|
||||
#define NUM_UL_ACTORS 2
|
||||
|
||||
// Set the number of barriers for processSlotTX to 512. This value has to be at least 483 for NTN where
|
||||
// DL-to-UL offset is up to 483. The selected value is also half of the frame range so that
|
||||
@@ -519,8 +517,8 @@ typedef struct PHY_VARS_NR_UE_s {
|
||||
sl_nr_sidelink_mode_t sl_mode;
|
||||
sl_nr_ue_phy_params_t SL_UE_PHY_PARAMS;
|
||||
Actor_t sync_actor;
|
||||
Actor_t dl_actors[NUM_DL_ACTORS];
|
||||
Actor_t ul_actors[NUM_UL_ACTORS];
|
||||
Actor_t *dl_actors;
|
||||
Actor_t *ul_actors;
|
||||
ntn_config_message_t* ntn_config_message;
|
||||
pthread_t main_thread;
|
||||
pthread_t stat_thread;
|
||||
|
||||
@@ -516,7 +516,7 @@ int main(int argc, char **argv)
|
||||
bzero(output, sizeof(output));
|
||||
if (input_fd == NULL) {
|
||||
msgDataTx.num_pdsch_slot = 1;
|
||||
nr_dlsch_encoding(gNB, &msgDataTx, frame, slot, frame_parms, output, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
nr_dlsch_encoding(gNB, &msgDataTx, frame, slot, frame_parms, output, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
for (SNR = snr0; SNR < snr1 && !stop; SNR += snr_step) {
|
||||
|
||||
@@ -1015,6 +1015,7 @@ printf("%d\n", slot);
|
||||
reset_meas(&gNB->tprep);
|
||||
reset_meas(&gNB->tparity);
|
||||
reset_meas(&gNB->toutput);
|
||||
reset_meas(&gNB->tconcat);
|
||||
reset_meas(&gNB->phase_comp_stats);
|
||||
|
||||
uint32_t errors_scrambling[16] = {0};
|
||||
@@ -1314,12 +1315,17 @@ printf("%d\n", slot);
|
||||
printStatIndent2(&gNB->dci_generation_stats, "DCI encoding time");
|
||||
printStatIndent2(&gNB->dlsch_encoding_stats,"DLSCH encoding time");
|
||||
printStatIndent3(&gNB->dlsch_segmentation_stats,"DLSCH segmentation time");
|
||||
gNB->tinput.trials = gNB->dlsch_encoding_stats.trials;
|
||||
printStatIndent3(&gNB->tinput,"DLSCH LDPC input processing time");
|
||||
printStatIndent3(&gNB->tprep,"DLSCH LDPC input preparation time");
|
||||
gNB->tparity.trials = gNB->dlsch_encoding_stats.trials;
|
||||
printStatIndent3(&gNB->tparity,"DLSCH LDPC parity generation time");
|
||||
gNB->toutput.trials = gNB->dlsch_encoding_stats.trials;
|
||||
printStatIndent3(&gNB->toutput,"DLSCH LDPC output generation time");
|
||||
printStatIndent3(&gNB->dlsch_rate_matching_stats,"DLSCH Rate Mataching time");
|
||||
gNB->dlsch_rate_matching_stats.trials = gNB->dlsch_encoding_stats.trials;
|
||||
printStatIndent3(&gNB->dlsch_rate_matching_stats,"DLSCH Rate Matching time");
|
||||
gNB->dlsch_interleaving_stats.trials = gNB->dlsch_encoding_stats.trials;
|
||||
printStatIndent3(&gNB->dlsch_interleaving_stats, "DLSCH Interleaving time");
|
||||
printStatIndent3(&gNB->tconcat, "DLSCH Segment Concatenation time");
|
||||
printStatIndent2(&gNB->dlsch_modulation_stats,"DLSCH modulation time");
|
||||
printStatIndent2(&gNB->dlsch_scrambling_stats, "DLSCH scrambling time");
|
||||
printStatIndent2(&gNB->dlsch_precoding_stats,"DLSCH Mapping/Precoding time");
|
||||
|
||||
@@ -336,17 +336,14 @@ static void config_preamble_index(NR_UE_MAC_INST_t *mac)
|
||||
nb_of_preambles = preamb_ga;
|
||||
}
|
||||
}
|
||||
int rand_preamb = (rand_r(&seed) % ra->ssb_ro_config.preambles_per_ssb);
|
||||
int pream_per_ssb = min(ra->ssb_ro_config.preambles_per_ssb, nb_of_preambles);
|
||||
int rand_preamb = rand_r(&seed) % pream_per_ssb;
|
||||
if (ra->ssb_ro_config.ssb_per_ro < 1)
|
||||
ra->ra_PreambleIndex = groupOffset + rand_preamb;
|
||||
else {
|
||||
int ssb_pr_idx = mac->ssb_list.nb_ssb_per_index[mac->mib_ssb] % (int)ra->ssb_ro_config.ssb_per_ro;
|
||||
ra->ra_PreambleIndex = groupOffset + (ssb_pr_idx * ra->ssb_ro_config.preambles_per_ssb) + rand_preamb;
|
||||
}
|
||||
AssertFatal(ra->ra_PreambleIndex < nb_of_preambles,
|
||||
"Error! Selected preamble %d which exceeds number of prambles available %d\n",
|
||||
ra->ra_PreambleIndex,
|
||||
nb_of_preambles);
|
||||
}
|
||||
|
||||
static void configure_ra_preamble(NR_UE_MAC_INST_t *mac)
|
||||
|
||||
@@ -973,6 +973,7 @@ void dl_rrc_message_transfer(const f1ap_dl_rrc_message_t *dl_rrc)
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, UE->CellGroup);
|
||||
UE->CellGroup = oldUE->CellGroup;
|
||||
oldUE->CellGroup = NULL;
|
||||
UE->mac_stats = oldUE->mac_stats;
|
||||
mac_remove_nr_ue(mac, *dl_rrc->old_gNB_DU_ue_id);
|
||||
pthread_mutex_unlock(&mac->sched_lock);
|
||||
nr_rlc_remove_ue(dl_rrc->gNB_DU_ue_id);
|
||||
|
||||
@@ -1818,8 +1818,8 @@ rrc_ue_process_ueCapabilityEnquiry(
|
||||
ul_dcch_msg.message.choice.c1.choice.ueCapabilityInformation.rrc_TransactionIdentifier = UECapabilityEnquiry->rrc_TransactionIdentifier;
|
||||
ue_CapabilityRAT_Container.rat_Type = LTE_RAT_Type_eutra;
|
||||
OCTET_STRING_fromBuf(&ue_CapabilityRAT_Container.ueCapabilityRAT_Container,
|
||||
(const char *)UE_rrc_inst[ctxt_pP->module_id].UECapability,
|
||||
UE_rrc_inst[ctxt_pP->module_id].UECapability_size);
|
||||
(const char *)UE_rrc_inst[ctxt_pP->module_id].UECap->sdu,
|
||||
UE_rrc_inst[ctxt_pP->module_id].UECap->sdu_size);
|
||||
// ue_CapabilityRAT_Container.ueCapabilityRAT_Container.buf = UE_rrc_inst[ue_mod_idP].UECapability;
|
||||
// ue_CapabilityRAT_Container.ueCapabilityRAT_Container.size = UE_rrc_inst[ue_mod_idP].UECapability_size;
|
||||
AssertFatal(UECapabilityEnquiry->criticalExtensions.present == LTE_UECapabilityEnquiry__criticalExtensions_PR_c1,
|
||||
|
||||
@@ -2562,6 +2562,9 @@ void nr_rrc_going_to_IDLE(NR_UE_RRC_INST_t *rrc,
|
||||
nr_pdcp_release_drb(rrc->ue_id, i);
|
||||
}
|
||||
}
|
||||
// stop TUN threads and clean up SDAP entities
|
||||
nr_sdap_delete_ue_entities(rrc->ue_id);
|
||||
|
||||
for (int i = 1; i < NR_NUM_SRB; i++) {
|
||||
if (rrc->Srb[i] != RB_NOT_PRESENT) {
|
||||
rrc->Srb[i] = RB_NOT_PRESENT;
|
||||
|
||||
@@ -121,8 +121,21 @@ static void *sdap_tun_read_thread(void *arg)
|
||||
while (!entity->stop_thread) {
|
||||
len = read(entity->pdusession_sock, &rx_buf, NL_MAX_PAYLOAD);
|
||||
if (len == -1) {
|
||||
LOG_E(PDCP, "could not read(): errno %d %s\n", errno, strerror(errno));
|
||||
return NULL;
|
||||
if (errno == EINTR)
|
||||
continue; // interrupted system call
|
||||
|
||||
if (errno == EBADF || errno == EINVAL) {
|
||||
LOG_I(SDAP, "Socket closed, exiting TUN read thread for UE %ld, PDU session %d\n", entity->ue_id, entity->pdusession_id);
|
||||
break;
|
||||
}
|
||||
|
||||
LOG_E(PDCP, "read() failed: errno %d (%s)\n", errno, strerror(errno));
|
||||
break;
|
||||
}
|
||||
|
||||
if (len == 0) {
|
||||
LOG_W(SDAP, "TUN socket returned EOF - exiting thread\n");
|
||||
break;
|
||||
}
|
||||
|
||||
LOG_D(SDAP, "read data of size %d\n", len);
|
||||
@@ -194,6 +207,10 @@ void remove_ip_if(nr_sdap_entity_t *entity)
|
||||
DevAssert(entity != NULL);
|
||||
// Stop the read thread
|
||||
entity->stop_thread = true;
|
||||
|
||||
// Close the socket: read() will get EBADF and exit
|
||||
close(entity->pdusession_sock);
|
||||
|
||||
int ret = pthread_join(entity->pdusession_thread, NULL);
|
||||
AssertFatal(ret == 0, "pthread_join() failed, errno: %d, %s\n", errno, strerror(errno));
|
||||
// Bring down the IP interface
|
||||
@@ -205,5 +222,5 @@ void remove_ip_if(nr_sdap_entity_t *entity)
|
||||
} else {
|
||||
tun_generate_ue_ifname(ifname, entity->ue_id, entity->pdusession_id != default_pdu ? entity->pdusession_id : -1);
|
||||
}
|
||||
tun_destroy(ifname, entity->pdusession_sock);
|
||||
tun_destroy(ifname);
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ static void nr_sdap_rx_entity(nr_sdap_entity_t *entity,
|
||||
LOG_D(SDAP, "RX Entity offset : %d\n", offset);
|
||||
|
||||
if (len != size-offset)
|
||||
LOG_E(SDAP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
|
||||
LOG_E(SDAP, "write failed to fd %d! errno = %s\n", entity->pdusession_sock, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,3 +11,5 @@ target_link_libraries(fgs_5gmm_ies_lib
|
||||
PUBLIC nas_common_ies_lib
|
||||
PRIVATE log_headers
|
||||
)
|
||||
|
||||
target_include_directories(fgs_5gmm_ies_lib PRIVATE ../../)
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "OctetString.h"
|
||||
#include "fgs_nas_utils.h"
|
||||
|
||||
#ifndef FGS_MOBILE_IDENTITY_H_
|
||||
#define FGS_MOBILE_IDENTITY_H_
|
||||
@@ -129,15 +129,22 @@ typedef struct {
|
||||
uint8_t macaddr;
|
||||
} Macaddr5GSMobileIdentity_t;
|
||||
|
||||
#define FOREACH_IDENTITY_TYPE(TYPE_DEF) \
|
||||
TYPE_DEF(FGS_MOBILE_IDENTITY_NOIDENTITY, 0) \
|
||||
TYPE_DEF(FGS_MOBILE_IDENTITY_SUCI, 1) \
|
||||
TYPE_DEF(FGS_MOBILE_IDENTITY_5G_GUTI, 2) \
|
||||
TYPE_DEF(FGS_MOBILE_IDENTITY_IMEI, 3) \
|
||||
TYPE_DEF(FGS_MOBILE_IDENTITY_5GS_TMSI, 4) \
|
||||
TYPE_DEF(FGS_MOBILE_IDENTITY_IMEISV, 5) \
|
||||
TYPE_DEF(FGS_MOBILE_IDENTITY_MAC_ADDR, 6) \
|
||||
TYPE_DEF(FGS_MOBILE_IDENTITY_EUI64, 7)
|
||||
|
||||
typedef enum { FOREACH_IDENTITY_TYPE(TO_ENUM) } fgs_identity_type_t;
|
||||
|
||||
static const text_info_t fgs_identity_type_text[] = {FOREACH_IDENTITY_TYPE(TO_TEXT)};
|
||||
|
||||
// clang-format off
|
||||
typedef union FGSMobileIdentity_tag {
|
||||
#define FGS_MOBILE_IDENTITY_NOIDENTITY 0b000
|
||||
#define FGS_MOBILE_IDENTITY_SUCI 0b001
|
||||
#define FGS_MOBILE_IDENTITY_5G_GUTI 0b010
|
||||
#define FGS_MOBILE_IDENTITY_IMEI 0b011
|
||||
#define FGS_MOBILE_IDENTITY_5GS_TMSI 0b100
|
||||
#define FGS_MOBILE_IDENTITY_IMEISV 0b101
|
||||
#define FGS_MOBILE_IDENTITY_MAC_ADDR 0b110
|
||||
NoIdentity5GSMobileIdentity_t noidentity;
|
||||
Suci5GSMobileIdentity_t suci;
|
||||
Guti5GSMobileIdentity_t guti;
|
||||
|
||||
@@ -5,6 +5,7 @@ add_library(fgs_5gmm_lib OBJECT
|
||||
fgmm_service_reject.c
|
||||
RegistrationRequest.c
|
||||
RegistrationAccept.c
|
||||
fgmm_identity_request.c
|
||||
FGSIdentityResponse.c
|
||||
FGSAuthenticationResponse.c
|
||||
FGSNASSecurityModeComplete.c
|
||||
|
||||
37
openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_identity_request.c
Normal file
37
openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_identity_request.c
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include "fgmm_identity_request.h"
|
||||
#include <string.h>
|
||||
#include "FGSMobileIdentity.h"
|
||||
|
||||
int decode_fgs_identity_request(fgs_identity_request_msg_t *msg, const byte_array_t *buffer)
|
||||
{
|
||||
if (buffer->len < 1) {
|
||||
PRINT_NAS_ERROR("Failed to decode NAS Identity Request: invalid buffer length %ld\n", buffer->len);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Bits 3-1 (least significant 3 bits)
|
||||
msg->fgsmobileidentity = buffer->buf[0] & 0x07;
|
||||
|
||||
return 1;
|
||||
}
|
||||
36
openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_identity_request.h
Normal file
36
openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_identity_request.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef FGS_IDENTITY_REQUEST_H
|
||||
#define FGS_IDENTITY_REQUEST_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "common/utils/ds/byte_array.h"
|
||||
#include "FGSMobileIdentity.h"
|
||||
|
||||
typedef struct {
|
||||
fgs_identity_type_t fgsmobileidentity;
|
||||
} fgs_identity_request_msg_t;
|
||||
|
||||
int decode_fgs_identity_request(fgs_identity_request_msg_t *msg, const byte_array_t *buffer);
|
||||
|
||||
#endif /* FGS_IDENTITY_REQUEST_H */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user