[dvsim] Logic to copy repo to scratch area

This change adds logic to copy the repo to the scratch area using
`rsync` command. The copy is triggered on the presence of two things -
- DVSIM_REMOTE_DISPATCH env variable defined
- `scratch_root` not being tool-default

If these conditions are met, it is assumed that a different scratch
area is being used, which is accessible to the user's workspace /
workstation as well as to the remote dispatch system. It is also assumed
that the remote dispatch system cannot access the user's workspace,
which is why the copying is needed. If the repo is copied to the scratch
area, the `proj_root` is set to the destination location, so that in
HJson files, everything is referenced from the destination as opposed
to the actual project root.

The destination is chosen to be `{scratch_root}/{branch}/repo_top`. This
is common to all toolflows run from the same branch.

The other change is removal of `tool_srcs_dir` and `tool_srcs`, and
addition of `proj_root` as a mandatory variable set for the Makefile.
All sources that the EDA tools need to have access to can now be
referenced from `{proj_root}` in the HJson files.

Lastly, a `--local` switch is added to dvsim to prevent triggering the
repo copy. It is user's responsibility to ensure that with `--local`,
DVSim is invoked such that the EDA tools are invoked from user's
workstation.

In the `common_project_cfg.hjson`, the changes reflect the above
updates.

Signed-off-by: Srikrishna Iyer <sriyer@google.com>

[dvsim, dv] Removal of `tool_srcs*`

This changes removes `tool_srcs*` from HJson and other files and
references all dependent sources from `{proj_root}` instead. Commit
b7ed20676 is required to support this change.

Wherever applicable, `{dv_root}` is used in lieu of `{proj_root}` to
stay opentitan-independent.

Signed-off-by: Srikrishna Iyer <sriyer@google.com>

[dvsim, fpv] Removal of `tool_srcs*`

This changes removes `tool_srcs*` from HJson and other files and
references all dependent sources from `{proj_root}` instead. Commit
b7ed20676 is required to support this change.

The second change is addition of `fpv_root`, which is where things that
could be common across OT and other projects can be found. All
references to `{proj_root}/hw/formal` are replaced with `{fpv_root}`.

Signed-off-by: Srikrishna Iyer <sriyer@google.com>

[dvsim, lint] Removal of `tool_srcs*`

This changes removes `tool_srcs*` from HJson and other files and
references all dependent sources from `{proj_root}` instead. Commit
b7ed20676 is required to support this change.

The second change is addition of `{lint_root}`, which represents a
location where all lint sources common across projects may reside. All
references to `{proj_root}/hw/lint` are replaced with `{lint_root}`.

Signed-off-by: Srikrishna Iyer <sriyer@google.com>

[dvsim, syn] Removal of `tool_srcs*`

This changes removes `tool_srcs*` from HJson and other files and
references all dependent sources from `{proj_root}` instead. Commit
b7ed20676 is required to support this change.

The second change is the addion of `{syn_root}` where all common
synthesis sources common across projects may reside. All isntances of
`{proj_root}/hw/syn` are replaced with `{syn_root}` as applicable.

Signed-off-by: Srikrishna Iyer <sriyer@google.com>
diff --git a/hw/data/common_project_cfg.hjson b/hw/data/common_project_cfg.hjson
index 29bfc2f..eb0fc8c 100644
--- a/hw/data/common_project_cfg.hjson
+++ b/hw/data/common_project_cfg.hjson
@@ -8,9 +8,13 @@
   results_server:   reports.opentitan.org
 
   // Default directory structure for the output
-  scratch_base_path:  "{scratch_root}/{dut}.{flow}.{tool}"
-  scratch_path:       "{scratch_base_path}/{branch}"
-  tool_srcs_dir:      "{scratch_path}/{tool}"
+  scratch_base_path:  "{scratch_root}/{branch}"
+  scratch_path:       "{scratch_base_path}/{dut}-{flow}-{tool}"
+
+  exports: [
+    { SCRATCH_PATH: "{scratch_path}" },
+    { proj_root: "{proj_root}" }
+  ]
 
   // Results server stuff - indicate what command to use to copy over the results.
   // Workaround for gsutil to fall back to using python2.7.