commit | e00f988e3c6d64697e72d3cb7518f137bb61c7e4 | [log] [tgz] |
---|---|---|
author | Dan McArdle <dmcardle@google.com> | Wed Jul 06 15:30:56 2022 -0400 |
committer | Alphan Ulusoy <alphan@google.com> | Sat Aug 27 05:23:11 2022 -0400 |
tree | 790d265ffad87b56d00e2b7128f02cde900e227c | |
parent | 51f3350a3396af40645e979aa49b2e2e408f7276 [diff] |
[sw] Optimize functions in //sw/device/lib/base:memory This commit optimizes the implementations of memcpy() and friends. They now operate on 32-bit words instead of bytes. To compare the performance impact of my optimizations, I ran the perftest without updating the cycle count expectations. ./bazelisk.sh test --test_output=streamed //sw/device/lib/base:memory_perftest_fpga_cw310 W00001 memory_perftest.c:246] memcpy: Expected: 210280 cycles Actual: 33270 cycles Actual/Expected: 15% W00002 memory_perftest.c:246] memcpy_zeroes: Expected: 210280 cycles Actual: 33270 cycles Actual/Expected: 15% W00003 memory_perftest.c:246] memset: Expected: 130310 cycles Actual: 23200 cycles Actual/Expected: 17% W00004 memory_perftest.c:246] memset_zeroes: Expected: 130310 cycles Actual: 23200 cycles Actual/Expected: 17% W00005 memory_perftest.c:246] memcmp_pathological: Expected: 210310 cycles Actual: 110740 cycles Actual/Expected: 52% W00006 memory_perftest.c:246] memcmp_zeroes: Expected: 210280 cycles Actual: 110740 cycles Actual/Expected: 52% W00007 memory_perftest.c:246] memrcmp_pathological: Expected: 200330 cycles Actual: 50740 cycles Actual/Expected: 25% W00008 memory_perftest.c:246] memrcmp_zeroes: Expected: 200300 cycles Actual: 50850 cycles Actual/Expected: 25% W00009 memory_perftest.c:246] memchr_pathological: Expected: 12820 cycles Actual: 7250 cycles Actual/Expected: 56% W00010 memory_perftest.c:246] memrchr_pathological: Expected: 47890 cycles Actual: 23850 cycles Actual/Expected: 49% Signed-off-by: Dan McArdle <dmcardle@google.com>
OpenTitan is an open source silicon Root of Trust (RoT) project. OpenTitan will make the silicon RoT design and implementation more transparent, trustworthy, and secure for enterprises, platform providers, and chip manufacturers. OpenTitan is administered by lowRISC CIC as a collaborative project to produce high quality, open IP for instantiation as a full-featured product. See the OpenTitan site and OpenTitan docs for more information about the project.
This repository contains hardware, software and utilities written as part of the OpenTitan project. It is structured as monolithic repository, or “monorepo”, where all components live in one repository. It exists to enable collaboration across partners participating in the OpenTitan project.
The project contains comprehensive documentation of all IPs and tools. You can access it online at docs.opentitan.org.
Have a look at CONTRIBUTING and our documentation on project organization and processes for guidelines on how to contribute code to this repository.
Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0 (see LICENSE for full text).